lisonge / vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat
MIT License
1.39k stars 71 forks source link

This request has been blocked; the content must be served over HTTPS #179

Closed laboratorys closed 3 months ago

laboratorys commented 3 months ago

Chrome 129.0.6637.0

Mixed Content: The page at 'https://www.google.com/' was loaded over HTTPS, but requested an insecure script 'http://localhost:8991/__vite-plugin-monkey.entry.js'. This request has been blocked; the content must be served over HTTPS

尝试了禁用CSP,无效

Clip_2024-08-15_18-11-35

lisonge commented 3 months ago

这不是 csp ,这是 https 网页里不能使用 http 资源 的报错

将 localhost 换成 127.0.0.1 应该可解决

另外为什么你的资源地址默认不是 127.0.0.1

laboratorys commented 3 months ago

这不是 csp ,这是 https 网页里不能使用 http 资源 的报错

将 localhost 换成 127.0.0.1 应该可解决

另外为什么你的资源地址默认不是 127.0.0.1 已解决,我把host改成了0.0.0.0