nginx.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. error_log nginx_main_error.log info;
  6. pid nginx_user.pid;
  7. daemon off;
  8. http {
  9. access_log nginx_access.log;
  10. error_log nginx_error.log info;
  11. types {
  12. text/html html htm shtml;
  13. text/css css;
  14. application/javascript js;
  15. application/wasm wasm;
  16. image/png png;
  17. image/jpeg jpg jpeg;
  18. image/svg+xml svg;
  19. }
  20. default_type application/octet-stream;
  21. sendfile on;
  22. server {
  23. # listen 8080 ssl;
  24. listen 8081;
  25. server_name localhost;
  26. gzip on;
  27. # Enable compression for .wasm, .js and .txt files (used for the runtime chunks)
  28. gzip_types application/javascript application/wasm text/plain application/octet-stream;
  29. charset utf-8;
  30. # ssl_certificate nginx.crt;
  31. # ssl_certificate_key nginx.key;
  32. location / {
  33. root build;
  34. autoindex on;
  35. index index.html index.htm;
  36. add_header 'Cross-Origin-Opener-Policy' 'same-origin' always;
  37. add_header 'Cross-Origin-Embedder-Policy' 'require-corp' always;
  38. add_header 'Cross-Origin-Resource-Policy' 'cross-origin' always;
  39. }
  40. }
  41. }