forked from activepieces/activepieces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.react.conf
55 lines (47 loc) · 1.63 KB
/
nginx.react.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
events{}
http {
include /etc/nginx/mime.types;
client_max_body_size 100m;
server_tokens off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
add_header X-Content-Type-Options "nosniff" always;
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location /socket.io {
proxy_pass http://localhost:3000/socket.io;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 900s;
proxy_send_timeout 900s;
}
location ~* ^/(?!api/).*.(css|js|jpg|jpeg|png|gif|ico|svg)$ {
root /usr/share/nginx/html;
add_header Expires "0";
add_header Cache-Control "public, max-age=31536000, immutable";
}
# Use the default language for the root of the application
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html?$args;
}
location /api/ {
proxy_pass http://localhost:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 900s;
proxy_send_timeout 900s;
}
}
}