You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.4 KiB

5 years ago
  1. location / {
  2. rewrite ^/.*$ /index.php last;
  3. }
  4. location ~ ^/combine.*\.(css|js) {
  5. rewrite ^/.*$ /index.php last;
  6. expires max;
  7. }
  8. # Whitelist
  9. ## Let October handle if static file not exists
  10. location = /favicon.ico { try_files $uri /index.php; }
  11. location ~ ^/.*\.xml { try_files $uri /index.php; }
  12. location = /robots.txt { try_files $uri /index.php; }
  13. location = /humans.txt { try_files $uri /index.php; }
  14. ## Let nginx return 404 if static file not exists
  15. location /storage/app/uploads/public {
  16. # add proxy cors headers
  17. add_header Access-Control-Allow-Headers "*" always;
  18. add_header Access-Control-Allow-Methods "*" always;
  19. add_header Access-Control-Allow-Origin "*" always;
  20. try_files $uri /404;
  21. }
  22. location /storage/app/media { try_files $uri /404; }
  23. location /storage/app/yml { try_files $uri /404; }
  24. location /storage/app/docx { try_files $uri /404; }
  25. location /storage/app/resized { try_files $uri /404; }
  26. location /storage/temp/public { try_files $uri /404; }
  27. location ~ ^/modules/.*/assets { try_files $uri /404; }
  28. location ~ ^/modules/.*/resources { try_files $uri /404; }
  29. location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
  30. location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
  31. location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
  32. location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
  33. location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
  34. location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
  35. location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
  36. location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
  37. location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
  38. location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
  39. location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
  40. location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
  41. location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
  42. location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
  43. location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
  44. location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
  45. location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
  46. location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
  47. location ~ ^/themes/.*/resources { try_files $uri /404; }