超图代码内置IP不变设置

 location /iserver {
            proxy_pass http://192.168.244.166:80/iserver;
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Credentials' 'true';
            proxy_redirect     off;
            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;

            # Enables WS support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
  }

posted @ 2021-11-11 16:47  羊大葱  阅读(63)  评论(0编辑  收藏  举报