The gateway has a feature that allows serving of the base index page that lists files in the directory if no index.html exists in the requested folder. In order to do this it performs a test request against <path>/ index.html to check for an existing index page.
For path-style URIs where the bucket name must be provided, this resulted in the bucket name being prepended to the request twice.
For more details on the presentation and required solution, please see the issue.
Fix
I wanted to keep s3uri in charge of the behavior here, so chose to add an options parameter to it with the option preserveBasePath so that we can ask it to do its other work, but give back a path without anything prepended. In the future this object could be used to offer control over other operations
What
Aims to fix https://github.com/nginxinc/nginx-s3-gateway/issues/210
The gateway has a feature that allows serving of the base index page that lists files in the directory if no
index.html
exists in the requested folder. In order to do this it performs a test request against<path>/ index.html
to check for an existing index page.For path-style URIs where the bucket name must be provided, this resulted in the bucket name being prepended to the request twice.
For more details on the presentation and required solution, please see the issue.
Fix
I wanted to keep
s3uri
in charge of the behavior here, so chose to add an options parameter to it with the optionpreserveBasePath
so that we can ask it to do its other work, but give back a path without anything prepended. In the future this object could be used to offer control over other operations