server { listen 80; server_name _; server_tokens off; 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'; # add_header 'Access-Control-Allow-Origin' 'http://localhost:5678'; add_header 'Access-Control-Allow-Origin' 'http://msa.js.sgcc.com.cn:6001'; add_header 'Access-Control-Allow-Credentials' 'true'; # add_header Cache-Control private; 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'; location / { if ($request_method = 'OPTIONS') { # add_header 'Content-Type' 'text/plain charset=UTF-8'; # add_header 'Content-Length' '0'; return 204; } proxy_pass http://otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }