serverless-s3-local icon indicating copy to clipboard operation
serverless-s3-local copied to clipboard

Host address documentation is confusing

Open iwb-rubentytgat opened this issue 6 years ago • 1 comments

The documentation shows a value of 0.0.0.0 for the host config parameter, giving the impression that it can be set to 0.0.0.0 to allow connections on all interfaces. This is, however, not how the code works.

In index.js on line #13 a default value of localhostis set for the config option address. This option is undocumented. It is used as the listening address for the server on line #210. The server is thus always listening on localhost.

On the other hand, on line #284 the host config parameter is being used to set the endpoint on the S3 client that is used to create the buckets.

Setting the host parameter to 0.0.0.0 thus causes the client to connect to 0.0.0.0 and time out, instead of hosting the server on address 0.0.0.0.

It would be nice if the documentation could clarify the effect of setting the host parameter, and if the address parameter could be documented as well.

iwb-rubentytgat avatar Jul 08 '19 15:07 iwb-rubentytgat

@iwb-rubentytgat Thanks for your great comment! I added the specification of host and address. Please check it.

ar90n avatar Jul 11 '19 15:07 ar90n