server { listen 80; server_name observe-front.cestong.com.cn ui.test.obs.js.sgcc.com.cn ui.obs.js.sgcc.com.cn; server_tokens off; error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; internal; } #charset koi8-r; #access_log /var/log/nginx/host.access.log main; #add_header 'Access-Control-Allow-Origin' '*'; #add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS'; #add_header 'Access-Control-Allow-Headers' '*'; #add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; location / { proxy_pass http://obf.observe.svc.cluster.local:80; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /col { add_header 'Access-Control-Allow-Origin' $allow_origin; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, PATCH, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Referer,Referrer-Policy'; add_header 'Access-Control-Max-Age' '1728000'; if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; rewrite ^/col/(.*)$ /$1 break; } location /ui { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Cache-Control private; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://obui.observe.svc.cluster.local:80; rewrite ^/ui/(.*)$ /$1 break; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /re { if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://ob-server.observe.svc.cluster.local; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; rewrite ^/re/(.*)$ /$1 break; } location /core { add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, PATCH, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Referer,Referrer-Policy, Authorization' always; add_header 'Access-Control-Max-Age' '1728000' always; if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://ob-core.observe.svc.cluster.local; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; rewrite ^/core/(.*)$ /$1 break; } location /api/v1/ws { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Cache-Control private; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://ob-server.observe.svc.cluster.local; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } location /app { if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://deepflow-app.deepflow.svc.cluster.local:20418; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; rewrite ^/app/(.*)$ /$1 break; } location /ui/api { if ($request_method = 'OPTIONS') { return 204; } return 202; } }