-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
61 lines (50 loc) · 1.59 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# If no Host match, close the connection to prevent host spoofing
# Not needed on k8s, as we already have an ingress that filters hosts.
#server {
# listen 80 default_server;
# return 444;
#}
# Health endpoint.
server {
listen 9090;
location = /health {
add_header Content-Type text/plain;
return 200 'ok';
}
}
server {
listen 8000;
keepalive_timeout 60;
client_max_body_size 4G;
# path for static files
root /var/www/sltech/;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript text/javascript application/wasm model/gltf-binary;
gzip_static on;
gzip_comp_level 8;
location /cairoprover/ {
rewrite ^/cairoprover/(.*) /$1 break;
proxy_pass http://devnet-cairohttp:3000;
proxy_set_header Host $host;
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# SPA: redirect all traffic to index.html unless otherwise found
# TODO: there should probably be some tighter rules around that somehow to get real 404s.
location / {
try_files $uri /index.html =404;
}
# Add some caching for assets (images, scripts).
# Vite automatically hashes those files so this is rather safe.
location /assets/ {
access_log off;
expires 7d;
add_header Cache-Control public;
}
}