Last active
October 30, 2019 05:10
-
-
Save jumping/3c961512edcf87cabc05b7d21af96aae to your computer and use it in GitHub Desktop.
nginx proxy request of object on s3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server{ | |
listen 80; | |
server_name test-mccdn.xxx.com; | |
location / { | |
#resolver 8.8.8.8; | |
#rewrite ^([^.]*[^/])$ $1/ permanent; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header Authorization ''; | |
proxy_set_header Host qa-stg-file.s3.cn-northwest-1.amazonaws.com.cn; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_hide_header x-amz-meta-server-side-encryption; | |
proxy_hide_header x-amz-server-side-encryption; | |
proxy_hide_header Set-Cookie; | |
proxy_ignore_headers Set-Cookie; | |
proxy_intercept_errors on; | |
add_header Cache-Control max-age=31536000; | |
proxy_pass http://qa-stg-file.s3.cn-northwest-1.amazonaws.com.cn/; | |
} | |
} | |
server_tokens off; | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment