We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于http和https的问题
网页端由于要走代理,为了安全代理地址默认是使用https,http会直接返回失败。而直接在思源内部,没有这个限制,http和https都行
思源笔记内部没这个问题,是因为 cross-fetch 检测到服务器支持https之后,发现请求却是http,然后做了一次自动转发,将http转发为https
测试的http没问题,是因为如果服务器不支持https,请求不会转发。
走代理有问题是因为,请求代理这边,我默认不会进行请求转发,所以http请求返回之后直接返回,不会去管是否转发到https。这个下版本会优化
参考:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307
The text was updated successfully, but these errors were encountered:
可能的修复方案:
方案一:浏览器插件页面给出提示,提示用户使用https
方案二:浏览器插件的调用,修改请求代理的处理逻辑。
如果服务器支持https,但是请求写的是http自动转发到https。 如果服务器不支持https,但是请求写的是http自动,仍然使用http。
简单的说,就是处理一下 307 重定向。遇到 307 进行请求重发。
Sorry, something went wrong.
fix: #400 浏览器插件不能使用http,只能用https-优化请求代理错误处理
1dd35c2
terwer
No branches or pull requests
关于http和https的问题
网页端由于要走代理,为了安全代理地址默认是使用https,http会直接返回失败。而直接在思源内部,没有这个限制,http和https都行
思源笔记内部没这个问题,是因为 cross-fetch 检测到服务器支持https之后,发现请求却是http,然后做了一次自动转发,将http转发为https
测试的http没问题,是因为如果服务器不支持https,请求不会转发。
走代理有问题是因为,请求代理这边,我默认不会进行请求转发,所以http请求返回之后直接返回,不会去管是否转发到https。这个下版本会优化
参考:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307
The text was updated successfully, but these errors were encountered: