livrare lot 2
This commit is contained in:
commit
8ecc78e729
763 changed files with 164593 additions and 0 deletions
53
backend/admin-dashboard/nginx.conf
Normal file
53
backend/admin-dashboard/nginx.conf
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
server {
|
||||
listen 3000;
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Enable gzip
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Proxy to Agent V3 API
|
||||
location /agent-v3/ {
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
set $agent_upstream didi-agent-v3;
|
||||
rewrite ^/agent-v3/(.*) /$1 break;
|
||||
proxy_pass http://$agent_upstream:24803;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
}
|
||||
|
||||
# Proxy to Framework API
|
||||
location /framework/ {
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
set $framework_upstream didi-framework;
|
||||
rewrite ^/framework/(.*) /$1 break;
|
||||
proxy_pass http://$framework_upstream:3005;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
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;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue