Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle+ integration chrome extension issue
    primarykey
    data
    text
    <p>I am trying to integrate google+ API with my google chrome extension. My integration based on this quick start example introduced here: <a href="https://developers.google.com/+/quickstart/javascript" rel="nofollow">https://developers.google.com/+/quickstart/javascript</a></p> <p>I have migrated all inline javascript code to separate files, added content_security_policy line in my manifest.json file: </p> <blockquote> <p>"content_security_policy": "script-src 'self' <a href="https://www.googleapis.com/" rel="nofollow">https://www.googleapis.com/</a> <a href="https://plus.google.com/" rel="nofollow">https://plus.google.com/</a> <a href="https://apis.google.com/" rel="nofollow">https://apis.google.com/</a> <a href="https://accounts.google.com/" rel="nofollow">https://accounts.google.com/</a> <a href="https://ssl.gstatic.com" rel="nofollow">https://ssl.gstatic.com</a> <a href="https://csi.gstatic.com" rel="nofollow">https://csi.gstatic.com</a> <a href="https://developers.google.com" rel="nofollow">https://developers.google.com</a>; object-src 'self'"</p> </blockquote> <p>The problem is following. When I click on the Google+ button I get following error message:</p> <blockquote> <p>Refused to execute JavaScript URL because it violates the following Content Security Policy directive: <code>"script-src 'self' https://www.googleapis.com/ https://plus.google.com/ https://apis.google.com/ https://accounts.google.com/ https://ssl.gstatic.com https://csi.gstatic.com https://developers.google.com"</code>.</p> </blockquote> <p>Which is obviously unhappy with content_security_policy. It throws this exception on line 468 in this file: </p> <p><a href="https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.aop9WHMC8-8.O/m=client,plusone,signin/rt=j/sv=1/d=1/ed=1/am=EQ/rs=AItRSTNUM79OpqDtwYl6kryPkOs00evROQ/cb=gapi.loaded_0" rel="nofollow">https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.aop9WHMC8-8.O/m=client,plusone,signin/rt=j/sv=1/d=1/ed=1/am=EQ/rs=AItRSTNUM79OpqDtwYl6kryPkOs00evROQ/cb=gapi.loaded_0</a>.</p> <p>It seems it is trying to embed inline script and execute it after, which violates Content Security Policy. The same exception appears when I click to "Accept" button in the popup. As a result popup window hangs without response.</p> <p>Do you have any experience with that ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload