nginx.conf 717 B

123456789101112131415161718192021222324
  1. server {
  2. listen 80;
  3. location / {
  4. proxy_pass http://frontend:8080;
  5. proxy_set_header Host $host;
  6. proxy_set_header X-Real-IP $remote_addr;
  7. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  8. proxy_set_header X-Forwarded-Proto $scheme;
  9. }
  10. location ^~ /api {
  11. proxy_pass http://backend:8082;
  12. proxy_set_header Host $host;
  13. proxy_set_header X-Real-IP $remote_addr;
  14. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15. proxy_set_header X-Forwarded-Proto $scheme;
  16. proxy_set_header REMOTE-HOST $remote_addr;
  17. proxy_http_version 1.1;
  18. add_header X-Cache $upstream_cache_status;
  19. }
  20. }