Score
0
Watch 143 Star 416 Fork 190

xiaochun / zrlogJavaApache-2.0

如何开启整站https

Closed
Ruby呀  Opened this issue

今天刚刚申请了SSL证书,发现出现,

Mixed Content: The page at 'https://xx' was loaded over HTTPS, but requested an insecure stylesheet 'http://xx/assets/css/video-js.css?t=1530035504000'. This request has been blocked; the content must be served over HTTPS.

这些问题,建议路径拼接时使用 //当前协议,这样对升级改造友好。
:smile:

10568 94fzb 1578914711 1918253 ruby ya 1588187087 total 2 participants

Comments (4)

10568 94fzb 1578914711
xiaochun 2018-08-25 13:45 owner

@BelMode 你前面用的 nginx 吗?如果是 nginx 可以 在你的 http 模块里面加

输入图片说明

proxy_set_header X-Forwarded-Protocol $scheme; 或者是
proxy_set_header X-Forwarded-Proto $scheme;(建议使用这个)

具体代码在 https://github.com/94fzb/zrlog/blob/master/common/src/main/java/com/zrlog/web/util/WebTools.java 这里

10568 94fzb 1578914711
xiaochun 2018-08-25 13:47 owner

的确如果是静态字段用 // 会更好,我考虑下

1918253 ruby ya 1588187087
Ruby呀 2018-08-25 14:41

好的,已经有绿锁了。谢谢。

10568 94fzb 1578914711
xiaochun 2018-08-26 14:01 owner

@Snower08 谢谢反馈,你提建议已经采纳,已经在 2.0.5(如果是用 war 的话,可以直接通过管理后台更新就好了) 里面实现了

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/94fzb/zrlog.git
git@gitee.com:94fzb/zrlog.git
94fzb
zrlog
zrlog

Search

231008 48f1a665 1899542 231017 9a6720c6 1899542