如果默认不是80端口,在加授权后,跳转容易到默认端口,记得在nginx设置中的proxy_set_header Host $host:$server_port;中加上$server_port,下文中红色字体
server {
listen 8080;
server_name example.com *.example.com;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host:$server_port;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}