Skip to content

Instantly share code, notes, and snippets.

@norbinsh
Last active October 4, 2018 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbinsh/ad2c8192fac06530eca1a33523761bd5 to your computer and use it in GitHub Desktop.
Save norbinsh/ad2c8192fac06530eca1a33523761bd5 to your computer and use it in GitHub Desktop.
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