javascript - phonegap + ionic using Content-Security-Policy to load maps.googleapis.com, how to? -


i have tried many ways of loading google maps , firebaseio without success: have now:

<meta http-equiv="content-security-policy" content="default-src 'self' data: gap: https://ssl.gstatic.com;   script-src 'self' https://maps.googleapis.com/* 'unsafe-inline' 'unsafe-eval';   style-src 'self' 'unsafe-inline';"> 

and get:

refused load script 'https://maps.googleapis.com/maps/api/js?libraries=places' because violates following content security policy directive: "script-src 'self' https://maps.googleapis.com/* 'unsafe-inline' 'unsafe-eval'".  refused load script 'https://test.firebaseio.com/.lp?start=t&ser=79549912&cb=1&v=5' because violates following content security policy directive: "script-src 'self' https://maps.googleapis.com/* 'unsafe-inline' 'unsafe-eval'". 

any ideas doing wrong?

this did trick :)

<meta http-equiv="content-security-policy"           content="default-src *;                script-src 'self' 'unsafe-inline' 'unsafe-eval'                            127.0.0.1:*                            http://*.google.com                            http://*.gstatic.com                            http://*.googleapis.com                            http://*.firebaseio.com                            https://*.google.com                            https://*.gstatic.com                            https://*.googleapis.com                            https://*.firebaseio.com                            ;                style-src  'self' 'unsafe-inline'                           127.0.0.1                            http://*.google.com                            http://*.gstatic.com                            http://*.googleapis.com                            http://*.firebaseio.com                            https://*.google.com                            https://*.gstatic.com                            https://*.googleapis.com                            https://*.firebaseio.com "> 

and google script <script src="https://maps-api-ssl.google.com/maps/api/js?libraries=places"></script>


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -