[英]AWS Load Balancer appends :80 to url on http to https 301 redirect
When I go to my example application: https://example.com/r/123
it works as expected.当我 go 到我的示例应用程序时:
https://example.com/r/123
它按预期工作。
If I go to http://example.com/r/123
it seems the load balancer changes the url to https://example.com:80/r/123
. If I go to
http://example.com/r/123
it seems the load balancer changes the url to https://example.com:80/r/123
.
This page results in a ERR_SSL_PROTOCOL_ERROR.此页面导致 ERR_SSL_PROTOCOL_ERROR。
Is it possible to make AWS not add the port( :80
) in the redirect?是否可以让 AWS 不在重定向中添加端口(
:80
)?
My problem was solved by changing the server IP to 0.0.0.0
instead of the default value of localhost
in the nuxt server config.我的问题通过将服务器 IP 更改为
0.0.0.0
而不是 nuxt 服务器配置中localhost
的默认值来解决。
// nuxt.config.js
server: {
host: '0.0.0.0',
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.