Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location /cs {
- rewrite (.*) /cs/gen;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_pass http://cms.uno.com; # (same Nginx instance, separate server block)
- }
- location ~ /(?<rest_of_uri>.*) {
- return 402 "Good news, everyone, we have hit:n$host:$server_port$request_urin$http_x_testnFinal URI: $rest_of_urinuri(+args): $uri$is_args$args";
- }
- curl -H "X-Test: test" www.uno.com/cs
- Good news, everyone, we have hit:
- www.uno.com:81/cs
- test
- Final URI: cs
- uri(+args): /cs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement