nginxinc / nginx-s3-gateway

NGINX S3 Caching Gateway
Apache License 2.0
515 stars 127 forks source link

Removes the path in the URL #219

Closed krishk8s closed 7 months ago

krishk8s commented 7 months ago

Describe the bug I am trying to access s3 bucket objects (not a website) hosted on S3 bucket. Using EKS to access the files via nginx-ingress controller I can access the files and folders, but when i click on subfolder it's removing the path.. here is an example:

so https://hostme.com/something works and i can see folder1 and folder2 in there, but when i click on folder1 it removed the "something" in the url and obviously the path is not right and i get error

Ingress will be /something is pointing to the nginx-s3-gateway service on kubernetes

Expected behavior To keep the path consistently for all sub-folder and files

i did tried adding STRIP_LEADING_DIRECTORY_PATH to "/something"... but it's not working as expected also tried DIRECTORY_LISTING_PATH_PREFIX='main/' still the same..

When i port-forward, it's behaving as expected, it's via nginx-ingress is the issue here, obviously it's behind NLB

Your environment

Thanks Krish