Cordova refused to connect to xxxxx-Whitelist refuses to send a network request _cordova

Source: Internet
Author: User

Refused to connect to ' ' because it violates the following Content security Policy directive: "Default-src ' self ' data:gap: ' unsafe-eval '". Note which ' CONNECT-SRC ' was not explicitly set and so ' default-src ' is used as a fallback.

The error content means:

Refuses to connect to the URL of your specified request because it violates the content security policy instruction DEFAULT-SRC settings


In the error message, it has been said to violate the content Security policy directive,

Because there is no corresponding part in the content security policy, the DEFAULT-SRC instruction is used by default, and the DEFAULT-SRC instruction does not set the request URL setting we are sending, thus denying access.

If you want to set the Allow request data, you need to set the Content-security-policy connect-src *, meaning you can request to any URL, as follows:

<meta http-equiv= "Content-security-policy" content= "default-src ' self ' data:gap: '" Unsafe-eval '; Style-src ' self ' ' unsafe-inline '; MEDIA-SRC *; Img-src ' self ' data:content:; CONNECT-SRC *; " >

If the CONNECT-SRC directive is configured, the default instruction default-src is not used.

For other white list questions, you can leave a message.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.