Advertisement
Guest User

Untitled

a guest
May 4th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. location /cs {
  2. rewrite (.*) /cs/gen;
  3. proxy_set_header Host $host;
  4. proxy_set_header X-Forwarded-For $remote_addr;
  5. proxy_pass http://cms.uno.com; # (same Nginx instance, separate server block)
  6. }
  7.  
  8. location ~ /(?<rest_of_uri>.*) {
  9. 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";
  10. }
  11.  
  12. curl -H "X-Test: test" www.uno.com/cs
  13.  
  14. Good news, everyone, we have hit:
  15. www.uno.com:81/cs
  16. test
  17. Final URI: cs
  18. uri(+args): /cs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement