1234567891011121314151617181920212223242526272829303132 |
- server {
- listen 80;
- server_name observe-ui.cestong.com.cn;
- #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 / {
- 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;
- 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 {
- proxy_pass http://ob-server.observe.svc.cluster.local;
- rewrite ^/re/(.*)$ /$1 break;
- }
- }
|