简体   繁体   English

访问不同端口时,js fetch 失败并出现 net::ERR_SSL_PROTOCOL_ERROR

[英]js fetch fails with net::ERR_SSL_PROTOCOL_ERROR when accessing different ports

If I load a page using localhost:85 and try to fetch() a resource from localhost:8083 it gives me a ERR_SSL_PROTOCOL_ERROR error.如果我使用localhost:85加载页面并尝试从localhost:8083 fetch()资源,它会给我一个ERR_SSL_PROTOCOL_ERROR错误。

I do not have SSL enabled on either side.我没有在任一侧启用 SSL。 Clearly this is all in a development environment, how do I work around it?显然这一切都在开发环境中,我该如何解决呢?

So far, the only reasonable solution I've had was to edit both of the sites to operate out of the same port, but just have Nginx redirect the location.到目前为止,我唯一合理的解决方案是编辑两个站点以在同一个端口外运行,但只需让 Nginx 重定向该位置。 In other words:换句话说:

localhost:85 => localhost:85本地主机:85 => 本地主机:85

localhost:85/site2 => localhost:8083本地主机:85/site2 => 本地主机:8083

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 socket.io 错误网络::ERR_SSL_PROTOCOL_ERROR - socket.io error net::ERR_SSL_PROTOCOL_ERROR 在 react js 中使用新闻 api 时加载资源失败:net::ERR_SSL_PROTOCOL_ERROR - Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR while using news api in react js 如何修复由我的 js 代码引起的 net::ERR_SSL_PROTOCOL_ERROR - How do I fix net::ERR_SSL_PROTOCOL_ERROR caused by my js code 如何处理net :: ERR_SSL_PROTOCOL_ERROR? - How to deal with net::ERR_SSL_PROTOCOL_ERROR? 连接建立错误:尝试建立并连接到Websocket服务器时,抛出net :: ERR_SSL_PROTOCOL_ERROR - Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR is thrown when trying establish and connect to a websocket server Wordpress - 错误 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL 协议错误 - Wordpress - Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error 具有SSL的Azure辅助角色上的Node.js导致ERR_SSL_PROTOCOL_ERROR - Node.js on Azure Worker Role w/ SSL results in ERR_SSL_PROTOCOL_ERROR PHP Websocket 错误:net::ERR_SSL_PROTOCOL_ERROR 使用 cloudflare - PHP Websocket ERROR: net::ERR_SSL_PROTOCOL_ERROR using cloudflare POST https://localhost:5000/stored net::ERR_SSL_PROTOCOL_ERROR - POST https://localhost:5000/stored net::ERR_SSL_PROTOCOL_ERROR Javascript / jQuery HTML5 视频 - catch net::ERR_SSL_PROTOCOL_ERROR with listener - Javascript / jQuery HTML5 Video - catch net::ERR_SSL_PROTOCOL_ERROR with listener
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM