• Welcome to LiuJason's Blog!

[已解决]Discuz 3.4 开启SSL后验证码无法加载|Chrome报错MIME type ('text/html') is not executable

Coding Projects Jason 5 years ago (2018-11-29) 1768 Views 0 Comments

问题:
在DZ开启SSL之后发现的问题,IE和Safari浏览器都是正常的,只有chrome不显示验证码...
然后检查代码发现提示:

Refused to execute script from 'https://xxx/misc.php?mod=seccode&action=update&idhash=cSG9g7Qp&0.25822917361359776&modid=forum::forumdisplay' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

解决办法:
找到调用script的那几个php代码,在代码的头部加上下面这段:

header('Content-Type: application/javascript');

具体影响的PHP文件:
/source/module/misc/ 目录下的misc_patch.php和misc_seccode.php


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/131.html
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址