Tiny UI library for Preact https://git.dany.dev/dsluijk/teenyui
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.
 
 
 
 
 
 

53 lines
1.3 KiB

  1. events {
  2. worker_connections 4096;
  3. }
  4. http {
  5. # Set the index
  6. index index.html;
  7. include mime.types;
  8. default_type application/octet-stream;
  9. # Make sure client side routing still works
  10. proxy_intercept_errors on;
  11. error_page 404 = /index.html;
  12. # Optimize request data
  13. client_max_body_size 2m;
  14. client_body_buffer_size 128k;
  15. # Set open file cache
  16. open_file_cache max=10000 inactive=5m;
  17. open_file_cache_valid 10m;
  18. open_file_cache_min_uses 1;
  19. open_file_cache_errors on;
  20. # Enable GZip of files GZipped during build.
  21. gzip_static on;
  22. # Enable on-the-fly GZip for files not GZipped on build time.
  23. gzip on;
  24. gzip_buffers 64 8k;
  25. gzip_comp_level 9;
  26. gzip_disable "msie6";
  27. gzip_http_version 1.1;
  28. gzip_types text/plain application/javascript application/json;
  29. # Add a few security headers
  30. add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload" always;
  31. add_header Content-Security-Policy "default-src 'self'" always;
  32. add_header X-Content-Type-Options "nosniff" always;
  33. add_header X-XSS-Protection "1; mode=block" always;
  34. add_header X-Frame-Options DENY always;
  35. server {
  36. # Create the server
  37. listen 80;
  38. root /usr/share/nginx/html;
  39. # Add cache expiration
  40. expires 3h;
  41. add_header Cache-Control "public";
  42. }
  43. }