内容安全政策cordova问题(Content Security Policy cordova problems)
我在我的Windows PC上使用ionic创建了一个应用程序,现在当切换到mac时,我从控制台收到此错误
“拒绝加载https://lorem.firebaseio.com/.lp?start=t&ser=59502592&cb=11&v=5,因为它没有出现在Content Security的script-src指令中”。
我已经尝试在我的标题中修改我的CSP标签,我似乎无法让它工作。 此外,我尝试重新添加所有插件/平台/资源。
我现在使用的标签是
<meta http-equiv="Content-Security-Policy" content="default-src * data: cdvfile: gap:; style-src 'self' https://cdn.firebase.com https://*.firebaseio.com https://lorem.firebaseio.com/*; script-src 'self' 'unsafe-eval'">
我也想知道为什么我不能像过去那样将它添加到我的白名单插件中
<allow-navigation href="*"/> <allow-navigation href="http://192.168.178.13:8100"/> <allow-intent href="*.firebaseio.com"/> <allow-intent href="auth.firebase.com"/>
----------------------------- edit -------------------- ---------
为了解决我的所有问题,我使用了这3个标签
content="default-src * data: cdvfile: gap:; style-src 'self' 'unsafe-inline'; img-src 'self' 'unsafe-inline'; script-src 'self' https://lorem.firebaseio.com/* https://cdn.firebase.com https://*.firebaseio.com 'unsafe-eval'">
I made an app using ionic on my windows pc, now when switching to a mac i get this error from the console
"Refused to load https://lorem.firebaseio.com/.lp?start=t&ser=59502592&cb=11&v=5 because it does not appear in the script-src directive of the Content Security ".
Already i tried modifying my CSP tag in my header, i cant seem to get it to work tho. Also i tried re-adding all plugins/platforms/resouce.
The tag im using right now is
<meta http-equiv="Content-Security-Policy" content="default-src * data: cdvfile: gap:; style-src 'self' https://cdn.firebase.com https://*.firebaseio.com https://lorem.firebaseio.com/*; script-src 'self' 'unsafe-eval'">
Also im wondering why i cant add this to my whitelist plugin like i did in the past
<allow-navigation href="*"/> <allow-navigation href="http://192.168.178.13:8100"/> <allow-intent href="*.firebaseio.com"/> <allow-intent href="auth.firebase.com"/>
----------------------------- edit -----------------------------
To fix all of my issues i used this 3 tags
content="default-src * data: cdvfile: gap:; style-src 'self' 'unsafe-inline'; img-src 'self' 'unsafe-inline'; script-src 'self' https://lorem.firebaseio.com/* https://cdn.firebase.com https://*.firebaseio.com 'unsafe-eval'">
原文:https://stackoverflow.com/questions/40679720
满意答案
What you are referring to are the "common dialogs", and you can get a file open dialog with GetOpenFileName
BOOL GetOpenFileName( LPOPENFILENAME lpofn );
相关问答
更多如何在Windows中开始编程?(How to start programming in Windows? [closed])
在Windows 8中的文件IO(File IO in Windows 8)
如何在windows编程中做“选择文件”功能?(how to make “choose file” function on windows programming?)
R编程功能没有()(R programming function without ())
在Windows上用C进行直接GDI编程(Straight GDI Programming in C on Windows)
基本的bash编程(Basic bash programming)
编程Windows Phone 7与正常的.NET编程不同吗?(Is programming Windows Phone 7 different from normal .NET programming?)
是否可以选择在Windows中启动进程时使用的清单?(Is it possible to choose a manifest to use when starting a process in windows?)
从read.csv(file.choose())获取文件名(Get filename from read.csv(file.choose( )))
如何使用选项进行bat文件列表(How to make bat file listing with options to choose)
相关文章
更多《Spring Security 3》 【第二章】 Spring Security起步(1)
《Spring Security 3》 【第二章】 Spring Security起步(3)
《Spring Security 3》 【第二章】 Spring Security起步(2)
怎么用spring security?
《Spring Security 3》 【第三章】增强用户体验(5)
《Spring Security 3》 【第一章】 一个不安全应用的剖析
《Spring Security 3》 【第四章】 凭证安全存储(1)
《Spring Security 3》 【第三章】增强用户体验(3)
《Spring Security 3》 【第五章】 精确的访问控制(1)
《Spring Security 3》 【第四章】 凭证安全存储(5)
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!