Support for exposing Cache-Control-related headers in response #227
-
If the file is found and available, I want to generate responses with the added I can try to achieve this with additional reverse proxy Nginx and the Does UPD: after another round of reading Nginx docs, I found that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @andrew-demb - very sorry for the delay in my response. Thank you for providing so much detail in your question. My understanding is that you want to generate your own unique In any case, we include a blank configuration file(https://github.com/nginxinc/nginx-s3-gateway/blob/master/common/etc/nginx/templates/gateway/s3_server.conf.template) that you can override to inject your own configuration. Instructions for how to do that are here https://github.com/nginxinc/nginx-s3-gateway/blob/master/docs/development.md#stub-files In that file, if you add something like add_header "Cache-Control" "public, max-age=31536000, immutable"; You can I think control things however you'd like. I have not personally tested this out but it might be worth a try to see if it works for your use case. Happy to work through it with you if this does not work or I misunderstood your situation. I'll admit that I didn't fully understand issue you noted in your update to this question. |
Beta Was this translation helpful? Give feedback.
Hello @andrew-demb - very sorry for the delay in my response. Thank you for providing so much detail in your question.
My understanding is that you want to generate your own unique
Cache-Control
headers in the response from the s3 gateway. You do not want to pass on headers from S3, correct?In any case, we include a blank configuration file(https://github.com/nginxinc/nginx-s3-gateway/blob/master/common/etc/nginx/templates/gateway/s3_server.conf.template) that you can override to inject your own configuration. Instructions for how to do that are here https://github.com/nginxinc/nginx-s3-gateway/blob/master/docs/development.md#stub-files
In that file, if you add something like