“No Content-Security-Policy meta tag found.” error in my phonegap application

后端 未结 6 707
再見小時候
再見小時候 2020-11-27 10:28

After update Cordova 5.0 in my system, I create new applications. When I tested my application on a device that time I get an error in the console log:

No Co         


        
6条回答
  •  感情败类
    2020-11-27 10:40

    After adding the cordova-plugin-whitelist, you must tell your application to allow access all the web-page links or specific links, if you want to keep it specific.

    You can simply add this to your config.xml, which can be found in your application's root directory:

    Recommended in the documentation:

    
    

    or:

    
    

    From the plugin's documentation:

    Navigation Whitelist

    Controls which URLs the WebView itself can be navigated to. Applies to top-level navigations only.

    Quirks: on Android it also applies to iframes for non-http(s) schemes.

    By default, navigations only to file:// URLs, are allowed. To allow other other URLs, you must add tags to your config.xml:

    
    
    
    
    
    
    
    
    
    
    
    
    
    

提交回复
热议问题