Nginx Ngnix Jsession已更改重定向问题

Nginx Ngnix Jsession已更改重定向问题,nginx,Nginx,有一个设置就像一个应用程序在www.xyz.com上运行一样,还有一个报告可以对www.abc.com上托管的应用程序进行rest点击 由于IE8上的CORS问题很奇怪,我们正在www.xyz.com上发布rest,但实际上服务托管在www.abc.com上,因此在ngnix级别,我们将rest请求从www.xyz.com重定向到www.abc.com 但在使用www.xzy.com应用程序上的报告后,当我们转到另一个页面时,会话就会过期。使用www.xyz.com上的报告后,jsessioni

有一个设置就像一个应用程序在www.xyz.com上运行一样,还有一个报告可以对www.abc.com上托管的应用程序进行rest点击

由于IE8上的CORS问题很奇怪,我们正在www.xyz.com上发布rest,但实际上服务托管在www.abc.com上,因此在ngnix级别,我们将rest请求从www.xyz.com重定向到www.abc.com

但在使用www.xzy.com应用程序上的报告后,当我们转到另一个页面时,会话就会过期。使用www.xyz.com上的报告后,jsessionid会发生更改

提前谢谢

server { listen 80; server_name www.xyz.com; charset utf-8; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 443; ssl on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate /etc/nginx/ssl.crt/server.crt; ssl_certificate_key /etc/nginx/ssl.key/server.key; server_name www.xyz.com; error_log /var/log/nginx/error.log; charset utf-8; location / { proxy_pass http://localhost:97; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; client_max_body_size 10M; } location /api/rest/b2b/v1/report/filters/program-summary { proxy_pass http://localhost:90/api/rest/b2b/v1/report/filters/program-summary; proxy_redirect off; proxy_pass_request_headers on; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/report/headers/grid/program-summary/DATAGRID { proxy_pass http://localhost:90/api/rest/b2b/v1/report/headers/grid/program-summary/DATAGRID; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/report/headers/grid/program-summary/SALES_REP { proxy_pass http://localhost:90/api/rest/b2b/v1/report/headers/grid/program-summary/SALES_REP; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/report/filters/variable/program-summary { proxy_pass http://localhost:90/api/rest/b2b/v1/report/filters/variable/program-summary; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/query/program-summary/barchart { proxy_pass http://localhost:90/api/rest/b2b/v1/query/program-summary/barchart; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/query/program-summary/datagrid { proxy_pass http://localhost:90/api/rest/b2b/v1/query/program-summary/datagrid; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/query/program-summary/status_pie { proxy_pass http://localhost:90/api/rest/b2b/v1/query/program-summary/status_pie; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; proxy_set_header X-Forwarded-Proto https; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/query/program-summary/summary { proxy_pass http://localhost:90/api/rest/b2b/v1/query/program-summary/summary; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v1/query/program-summary/sales_datagrid { proxy_pass http://localhost:90/api/rest/b2b/v1/query/program-summary/sales_datagrid; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,origin,authorization,accept,client-security-token'; } location /api/rest/b2b/v2/constants/CDN_URL { proxy_pass http://localhost:90/api/rest/b2b/v2/constants/CDN_URL; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_set_header Host $http_host; client_max_body_size 10M; } location ~ ^/templates/(.*)$ { alias /webroot/reporting-dashboard/templates/$1; } location ~ ^/data/(.*)$ { alias /webroot/reporting-dashboard/data/$1; } location ~ ^/styles/(.*)$ { alias /webroot/reporting-dashboard/styles/$1; } location ~ ^/bower_components/(.*)$ { alias /webroot/reporting-dashboard/bower_components/$1; } location /scripts/62219e5b.vendor.js { alias /webroot/reporting-dashboard/scripts/62219e5b.vendor.js; } location /scripts/9ec589bc.plugins.js { alias /webroot/reporting-dashboard/scripts/9ec589bc.plugins.js; } location /scripts/e13d4652.main.js { alias /webroot/reporting-dashboard/scripts/e13d4652.main.js; } error_page 502 503 504 /vzb_50x.html; location = /vzb_50x.html { root /tomcats/webapps/ROOT/static/errorFiles; } } 服务器{ 听80; 服务器名称www.xyz.com; 字符集utf-8; 重写^(.*)https://$server\u name$1永久; } 服务器{ 听443; ssl-on; ssl_协议TLSv1 TLSv1.1 TLSv1.2; ssl\U证书/etc/nginx/ssl.crt/server.crt; ssl\u certificate\u key/etc/nginx/ssl.key/server.key; 服务器名称www.xyz.com; error\u log/var/log/nginx/error.log; 字符集utf-8; 地点/{ 代理通行证http://localhost:97; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; } 位置/api/rest/b2b/v1/report/filters/program summary{ 代理通行证http://localhost:90/api/rest/b2b/v1/report/filters/program-总结; 代理_重定向关闭; 代理\u传递\u请求\u头打开; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/report/headers/grid/program summary/DATAGRID{ 代理通行证http://localhost:90/api/rest/b2b/v1/report/headers/grid/program-摘要/数据网格; 代理_重定向关闭; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理\u传递\u请求\u头打开; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/report/headers/grid/program summary/SALES_REP{ 代理通行证http://localhost:90/api/rest/b2b/v1/report/headers/grid/program-总结/销售代表; 代理_重定向关闭; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理\u传递\u请求\u头打开; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/report/filters/variable/program summary{ 代理通行证http://localhost:90/api/rest/b2b/v1/report/filters/variable/program-总结; 代理_重定向关闭; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理\u传递\u请求\u头打开; 代理设置头主机$http\U主机; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/query/program summary/barchart{ 代理通行证http://localhost:90/api/rest/b2b/v1/query/program-摘要/条形图; 代理_重定向关闭; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理\u传递\u请求\u头打开; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/query/program summary/datagrid{ 代理通行证http://localhost:90/api/rest/b2b/v1/query/program-摘要/数据网格; 代理_重定向关闭; 代理集头X-Real-IP$remote\u addr; proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For; 代理\u传递\u请求\u头打开; 代理设置头主机$http\U主机; 客户最大身体尺寸10米; 代理集头X转发协议https; 'DNT,X-CustomHeader,保持活动状态,用户代理,X-Requested-With,如果自修改,缓存控制,内容类型,来源,授权,接受,客户端安全令牌'; } 位置/api/rest/b2b/v1/query/program summary/status\u pie{ 代理通行证http://localhost:90/api/rest/b2b/v1/query/program-总结/现状; 代理_重定向关闭; 代理集头X-Real-IP$re