egg icon indicating copy to clipboard operation
egg copied to clipboard

egg怎么禁止 http 转到https, 我所有的资源,请求 都在http,现在我启动egg, 304转发到了https, 我想禁掉这个

Open w990752800 opened this issue 1 year ago • 2 comments

在此输入你需要反馈的 Bug 具体信息(Bug in Detail):

egg怎么禁止 http 转到https, 我所有的资源,请求 都在http,现在我启动egg, 304转发到了https, 我想禁掉这个

可复现问题的仓库地址(Reproduction Repo)

Node 版本号:

最新版

Eggjs 版本号:

最新版

相关插件名称与版本号(PlugIn and Name):

最新版

操作平台与版本号(Platform and Version):

最新版

w990752800 avatar Apr 18 '24 10:04 w990752800

你的 https 是在 egg 这层做的?那就去掉启动参数的证书即可。 不过我怀疑这个应该是在前置的 nginx 做的,这就不是 egg 的事了。

最后,HTTP 已经过时了,不要坚持了,后面浏览器的限制只会越来越大。

atian25 avatar Apr 19 '24 01:04 atian25

现在应该都是HTTP强制跳转到HTTPS了吧。在nginx反代里面可以进行配置,然后 proxy_pass 到egg启动的端口就行了

svenjia avatar Apr 19 '24 08:04 svenjia