lisonge / vite-plugin-monkey

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

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

Closed laboratorys closed 4 weeks ago

laboratorys commented 1 month 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 1 month ago

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

将 localhost 换成 127.0.0.1 应该可解决

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

laboratorys commented 4 weeks ago

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

将 localhost 换成 127.0.0.1 应该可解决

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