chore: initialize insar management system v2
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
worker_processes 1;
|
||||
error_log "Z:/Code/Insar_management_system_v2/logs/nginx_error.log" warn;
|
||||
pid "Z:/Code/Insar_management_system_v2/logs/nginx.pid";
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log "Z:/Code/Insar_management_system_v2/logs/nginx_access.log";
|
||||
client_body_temp_path "Z:/Code/Insar_management_system_v2/nginx/temp/client_body";
|
||||
proxy_temp_path "Z:/Code/Insar_management_system_v2/nginx/temp/proxy";
|
||||
fastcgi_temp_path "Z:/Code/Insar_management_system_v2/nginx/temp/fastcgi";
|
||||
uwsgi_temp_path "Z:/Code/Insar_management_system_v2/nginx/temp/uwsgi";
|
||||
scgi_temp_path "Z:/Code/Insar_management_system_v2/nginx/temp/scgi";
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
# CSP: allow both legacy tile port 8900 and current tile-server port 8910
|
||||
# If tile server address changes, update the sources below accordingly
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http://127.0.0.1:8900 http://127.0.0.1:8910 https://*.tile.openstreetmap.org https://*.tile.opentopomap.org; connect-src 'self' http://127.0.0.1:8900 http://127.0.0.1:8910; font-src 'self' data:; worker-src blob:;" always;
|
||||
|
||||
root "Z:/Code/Insar_management_system_v2/frontend/dist";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:18000;
|
||||
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;
|
||||
}
|
||||
|
||||
# SSE: disable buffering so events are pushed immediately
|
||||
location /api/tasks/active/stream {
|
||||
proxy_pass http://127.0.0.1:18000;
|
||||
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_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_set_header Connection '';
|
||||
}
|
||||
|
||||
location /image_cache/ {
|
||||
alias "Z:/Code/Insar_management_system_v2/backend/image_cache/";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user