default.conf 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. server {
  2. listen 80;
  3. server_name _;
  4. location = /fb-oo-hook.js {
  5. alias /etc/nginx/conf.d/fb-oo-hook.js;
  6. default_type application/javascript;
  7. add_header Cache-Control "no-store";
  8. }
  9. location = /fb-brand-hook.js {
  10. alias /etc/nginx/conf.d/fb-brand-hook.js;
  11. default_type application/javascript;
  12. add_header Cache-Control "no-store";
  13. }
  14. location = /fb-theme-hook.js {
  15. alias /etc/nginx/conf.d/fb-theme-hook.js;
  16. default_type application/javascript;
  17. add_header Cache-Control "no-store";
  18. }
  19. location = /fb-search.js {
  20. alias /etc/nginx/conf.d/fb-search.js;
  21. default_type application/javascript;
  22. add_header Cache-Control "no-store";
  23. }
  24. location = /fb-root-filter.js {
  25. alias /etc/nginx/conf.d/fb-root-filter.js;
  26. default_type application/javascript;
  27. add_header Cache-Control "no-store";
  28. }
  29. location = /fb-theme.css {
  30. alias /etc/nginx/conf.d/fb-theme.css;
  31. default_type text/css;
  32. add_header Cache-Control "no-store";
  33. }
  34. location = /fb-search.css {
  35. alias /etc/nginx/conf.d/fb-search.css;
  36. default_type text/css;
  37. add_header Cache-Control "no-store";
  38. }
  39. location = /search {
  40. alias /etc/nginx/conf.d/fb-search.html;
  41. default_type text/html;
  42. add_header Cache-Control "no-store";
  43. }
  44. location ~ ^/fb-wallpaper/(frappe|latte|macchiato|mocha|preview)\.webp$ {
  45. alias /etc/nginx/conf.d/$1.webp;
  46. default_type image/webp;
  47. add_header Cache-Control "no-store";
  48. }
  49. location = /fb-logo.png {
  50. alias /opt/fb-assets/log.png;
  51. default_type image/png;
  52. add_header Cache-Control "no-store";
  53. }
  54. location / {
  55. proxy_pass http://filebrowser:80;
  56. proxy_http_version 1.1;
  57. proxy_set_header Host $host;
  58. proxy_set_header X-Real-IP $remote_addr;
  59. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60. proxy_set_header X-Forwarded-Proto $scheme;
  61. proxy_read_timeout 3600;
  62. proxy_set_header Accept-Encoding "";
  63. sub_filter_once off;
  64. sub_filter_types text/html;
  65. sub_filter "</head>" "<style id=\"fb-prehide-native-brand\">header img[src*=\"/img/logo.svg\"]{opacity:0!important;}</style><link rel=\"stylesheet\" href=\"/fb-theme.css?v=20260306x2\"></head>";
  66. sub_filter "</body>" "<script src='/fb-oo-hook.js?v=20260306x11'></script><script src='/fb-brand-hook.js?v=20260306x11'></script><script src='/fb-theme-hook.js?v=20260306x11'></script><script src='/fb-root-filter.js?v=20260306y3'></script></body>";
  67. }
  68. }