Change MIME type coming from S3 #69
-
I would like to use this proxy to list files in my S3. Would it be possible to set the MIME type according to mime.types and default_type instead of the type coming from S3 request? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I believe that the gateway is just passing along the MIME type as provided by S3. Typically, the preferred approach is to set the correct mime type by setting the See the AWS docs here. Also, you could modify the headers by using one of the NGINX |
Beta Was this translation helpful? Give feedback.
I believe that the gateway is just passing along the MIME type as provided by S3. Typically, the preferred approach is to set the correct mime type by setting the
Content-Type
header in S3 and then the gateway will pass it along in the same way. The same is true for theContent-Disposition
header which informs the browser to either display or download a file.See the AWS docs here.
Also, you could modify the headers by using one of the NGINX
proxy_*
directives to modify the HTTP headers.