2017-04-24 63 views
0

當我加入我的index.html頁面上這一行[這是一個登錄表單]科爾多瓦內容安全策略給予了登錄問題

<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://codepush.azurewebsites.net/ data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">

它只是不進入下一個表格並按下後掛起登錄按鈕。

index.html:60 Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self' https://codepush.azurewebsites.net/ data: gap: https://ssl.gstatic.com 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

請參見下面的參考圖像 - https://www.dropbox.com/s/qwr11xb03gpqn8t/Screenshot%202017-04-24%2018.53.24.png?dl=0

回答

0

嘗試所有。使用<meta http-equiv="Content-Security-Policy" content="default-src * ; style-src 'self' 'unsafe-inline'; script-src 'self' https: 'unsafe-inline' 'unsafe-eval' ">