simple-kalorie-tracker 916 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server {
  2. root /usr/share/nginx/html;
  3. # access_log /usr/share/nginx/logs/access.log combined;
  4. # error_log /usr/share/nginx/logs/error.log error;
  5. include mime.types;
  6. # reuse port on redirects
  7. absolute_redirect off;
  8. try_files $uri $uri/ /index.html =404;
  9. location = /index.html {
  10. expires 0;
  11. add_header Cache-Control 'no-cache';
  12. break;
  13. }
  14. location = /sw.js {
  15. expires 0;
  16. add_header Cache-Control 'no-cache';
  17. break;
  18. }
  19. location = /favicon.ico {
  20. access_log off;
  21. break;
  22. }
  23. location = /manifest.json {
  24. access_log off;
  25. break;
  26. }
  27. location /logs {
  28. access_log off;
  29. auth_basic 'Restricted';
  30. auth_basic_user_file /etc/nginx/.htpasswd;
  31. }
  32. location ~ ^/(favicon\.png|fonts|js|img|css|app\.js|app\.css) {
  33. # set cache header
  34. expires 0;
  35. break;
  36. }
  37. }