Last active
November 4, 2015 10:13
-
-
Save tobbbe/47b151a5a0fffacccb46 to your computer and use it in GitHub Desktop.
cordova-whitelist-plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install plugin | |
ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git | |
in config.xml | |
<access origin="https://foo.se/api/*"/> | |
in index.html | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com foo.se https://foo.se; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';"> | |
<!--http://www.raymondcamden.com/2015/05/25/important-information-about-cordova-5--> | |
<!--http://content-security-policy.com/--> | |
content of the meta tag can be read as: | |
default-src 'self' data: foo.se https://foo.se; | |
style-src 'self' 'unsafe-inline'; | |
script-src 'self' 'unsafe-inline' 'unsafe-eval'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment