1. Background
When using Ajax to access across domains, an error is suddenly reported:
Access to XMLHttpRequest at 'http://127.0.0.1:yyy/' from origin 'http://xxx:yyy'
has been blocked by CORS policy:
The request client is not a secure context
and the resource is in more-private address space `local`.
The general meaning is that the request is blocked by cross-domain policy, and the client is not secure.
2. Analysis
Baidu has found many times that it is caused by the upgrade of Chrome browser, and this problem also exists in edge browser.
3. Solution
Enter in the address field chrome://flags/#block -Secure private network requests
, change the option to disable disable, and then restart the browser
Read More:
- [Solved] Nginx Request 500 Error: CreateFile() “/temp/client_body_temp/0000000013” failed (5: Access is denied)
- Current request is not a multipart request [How to Solve]
- Springcloud configuration center client 3355 startup Error: error on get request for“ http://localhost:8761/eureka/apps/ “: Connection
- How to Solve Chrome Error: net::ERR_FAILED
- [Solved] Chrome submission error: Form submission canceled because the form is not connected
- It can be opened with localhost, but not with IP address. The request host name is invalid
- Request processing failed; nested exception is com.alibaba.fastjson.JSONException: can not cast to J
- QT solves error: use of deleted function and is private within this context
- Resolve Chromedriver’s original error: chrome not reachable
- How to Solve Chrome Error: “ERR_HTTP2_PROTOCOL_ERROR”
- How to Solve Error Swift 4 Expression type ‘@value CGRect’ is ambiguous without more context
- [Solved] ssh secure shell: server responded algorithm negotiation failed
- [How to Solve] java.lang.IllegalArgumentException: Request header is too large
- [GO]Solve request origin not allowed by Upgrader.CheckOrigin websocket cross-domain
- [Solved] Error: Could not open client transport with JDBC Uri
- [Solved] Feign Error: -‘oauth-client.FeignClientSpecification‘ could not be registered
- [Solved] swagger3 Error: org.springframework.context.ApplicationContextException: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- [Solved] Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050
- [Solved] ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure.
- [Solved] HTTP Error 400. The request hostname is invalid.