Ryan Wang 👍 应该为反向代理的问题,我又测试了一下,直接访问没问题。配置了反向代理就存在这种问题。反向代理配置文件如下:
#PROXY-START/
location ^~ /
{
proxy_pass http://172.27.177.53:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
}
proxy_ignore_headers Set-Cookie Cache-Control expires;
proxy_cache cache_one;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 304 301 302 1m;
}
#PROXY-END/