Spaces:
Runtime error
Runtime error
Create nginx.conf
Browse files- nginx.conf +20 -0
nginx.conf
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
server {
|
| 2 |
+
listen 80;
|
| 3 |
+
server_name localhost;
|
| 4 |
+
root /usr/share/nginx/html;
|
| 5 |
+
index index.html;
|
| 6 |
+
|
| 7 |
+
location / {
|
| 8 |
+
try_files $uri $uri/ /index.html;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
# Правильный MIME-type для WASM
|
| 12 |
+
location ~* \.wasm$ {
|
| 13 |
+
default_type application/wasm;
|
| 14 |
+
add_header Cache-Control "public, max-age=3600";
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
# Включение сжатия
|
| 18 |
+
gzip on;
|
| 19 |
+
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/wasm;
|
| 20 |
+
}
|