Last active
October 4, 2018 11:39
-
-
Save norbinsh/ad2c8192fac06530eca1a33523761bd5 to your computer and use it in GitHub Desktop.
This file contains 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 443 ssl; | |
server_name x.x.net; | |
ssl on; | |
client_max_body_size 0; | |
location / { | |
mirror /root_mirror; | |
mirror_request_body on; | |
proxy_pass https://b.b/partner; | |
proxy_ssl_verify off; | |
proxy_pass_request_headers on; | |
proxy_pass_request_body on; | |
} | |
location = /root_mirror { | |
resolver 10.0.23.5; # local resolver | |
set $upstream_endpoint https://y.y.com/partner; # only this endpoint will be resolved via the local resolver | |
proxy_pass $upstream_endpoint; | |
proxy_pass_request_body on; | |
} | |
### Consider adding timeouts to mirror requests to avoid increased latency on actual requests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment