android - Using Cordova 5.0.0 Google Maps with Content Security Policy -


i m building cordova application android using cordova 5.0.0. , m using google maps without plugin , must without plugin. include script , meta tag .also cordova using whitelist plugin.

  <!-- meta tag -->  <meta http-equiv="content-security-policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">         <!-- google maps-->   <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>

it's give me error:

 refused load script 'https://maps.googleapis.com/maps/api/js?sensor=true' because violates following content security policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'".

try block error away

<meta http-equiv="content-security-policy" content=" default-src 'self' data: gap:     *; script-src 'self' 'unsafe-inline' 'unsafe-eval'     *; style-src 'self' 'unsafe-inline' 'unsafe-eval'     *; media-src 'self' 'unsafe-inline' 'unsafe-eval'     *; img-src 'self' 'unsafe-inline' 'unsafe-eval'     *; connect-srv 'self' 'unsafe-inline' 'unsafe-eval'     * "> 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -