-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
37 lines (29 loc) · 1.05 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
server {
listen 80;
# server_name https://vite-project.cn-pvg03-prd-r1-factory.k8s.tesla.com;
server_name 52.156.53.178;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /home/ {
try_files $uri $uri/ /index.html;
}
location /assets/ {
root /var/www/html;
}
location ~ ^/(saml|task|job|node|ukey|user|saml|s3|guidebook|mng|quickstart|current|ping)/?(.*)$ {
proxy_pass 52.156.53.178$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# CORS settings
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
}