app.conf 933 B

1234567891011121314151617181920212223242526272829
  1. # web proginn
  2. server {
  3. listen 80;
  4. server_name app.test.proginn.com;
  5. set $temp_request_id $http_x_request_id;
  6. if ($temp_request_id = "") {
  7. set $temp_request_id $request_id;
  8. }
  9. set $temp_scheme $http_x_forwarded_proto;
  10. if ($temp_scheme = "") {
  11. set $temp_scheme $scheme;
  12. }
  13. set $temp_addr $http_x_forwarded_for;
  14. if ($temp_addr = "") {
  15. set $temp_addr $remote_addr;
  16. }
  17. add_header 'X-Request-Id' "$temp_request_id";
  18. location / {
  19. proxy_pass http://127.0.0.1/;
  20. proxy_set_header Host dev.test.proginn.com;
  21. proxy_set_header X-Real-IP $temp_addr;
  22. proxy_set_header X-Forwarded-For $temp_addr;
  23. proxy_set_header X-Forwarded-Proto $temp_scheme;
  24. proxy_set_header X-Scheme $temp_scheme;
  25. proxy_set_header Origin $http_origin;
  26. proxy_set_header X-Request-Id $temp_request_id;
  27. proxy_http_version 1.1;
  28. }
  29. }