简体   繁体   English

是否有替代服务器可以在本地IP地址上工作以避开CORS?

[英]Is there a proxy server alternative that works on local IP addresses for getting around CORS?

I have had success getting around CORS for AJAX requests to public IP addresses through the use of proxy servers: effectively making the request from the server and returning the response with different headers. 通过使用代理服务器,我已经成功解决了针对公共IP地址的AJAX请求的CORS:有效地从服务器发出请求并返回带有不同标头的响应。 Is there something similar that would work on local IP addresses from a server hosted off-site? 是否有类似的东西可以在异地托管的服务器上的本地IP地址上使用? I do not have access to modify any of the code on this local IP. 我无权修改此本地IP上的任何代码。

You can't proxy data from a computer you can't make a connection to. 您无法从无法建立连接的计算机代理数据。

If both computers were on the same network (eg via a VPN) then this would work in exactly the same way. 如果两台计算机都在同一网络上(例如,通过VPN),则这将以完全相同的方式工作。

如果有帮助,您可以在浏览器中禁用CORS,或使用扩展名添加CORS标头

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM