default.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. client_max_body_size 1000m;
  5. gzip_static on;
  6. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  7. gzip_proxied any;
  8. gzip_vary on;
  9. gzip_comp_level 6;
  10. gzip_buffers 16 8k;
  11. gzip_http_version 1.1;
  12. add_header Access-Control-Allow-Origin *;
  13. add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
  14. add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
  15. if ($request_method = 'OPTIONS') {
  16. return 204;
  17. }
  18. location / {
  19. root /usr/share/nginx/html;
  20. try_files $uri $uri/ /index.html;
  21. }
  22. location /api/v2 {
  23. proxy_pass http://pas-api:8879;
  24. proxy_set_header Upgrade $http_upgrade;
  25. proxy_set_header Connection "upgrade";
  26. proxy_connect_timeout 86400s;
  27. proxy_read_timeout 86400s;
  28. proxy_send_timeout 86400s;
  29. }
  30. location /pdfjs {
  31. proxy_pass http://pas-api:8879;
  32. }
  33. location /file {
  34. proxy_pass http://pas-api:8879;
  35. }
  36. }