Hi everybody,
this is my first post here, I'm kind of desperate. I'm developping a chrome extension and I need to open a socket to my server on every url loaded.
My code so far works well, but in the extension, I can't load the socket.io.js to connect the client.
Everytme I get a :Refused to load the script 'http://myhost:8080/socket.io/socket.io.js' because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".What's the matter with that ?--
I load the script like that :<script src="http://ec2-46-137-131-185.eu-west-1.compute.amazonaws.com:8080/socket.io/socket.io.js"></script>The last two are correctly loaded, not the first one.
<script src="jquery-1.8.2.min.js"></script>
<script src="background.js"></script>
What do I miss ?
Is it a specific restriction ?
Please, any help will be appreciate :)
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/gKvYRFmYxM8J.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
You need to add the origin of the script source that you're loading to your CSP declaration.Is there any way you can just include the socket.io.js file locally in your extension?
On Tue, Oct 16, 2012 at 5:07 AM, Morgan Fromentin <morgan.f...@gmail.com> wrote:
Hi everybody,
this is my first post here, I'm kind of desperate. I'm developping a chrome extension and I need to open a socket to my server on every url loaded.
My code so far works well, but in the extension, I can't load the socket.io.js to connect the client.
Everytme I get a :Refused to load the script 'http://myhost:8080/socket.io/socket.io.js' because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".What's the matter with that ?
I load the script like that :<script src="http://ec2-46-137-131-185.eu-west-1.compute.amazonaws.com:8080/socket.io/socket.io.js"></script>The last two are correctly loaded, not the first one.
<script src="jquery-1.8.2.min.js"></script>
<script src="background.js"></script>
What do I miss ?
Is it a specific restriction ?
Please, any help will be appreciate :)
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/gKvYRFmYxM8J.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extensions+unsub...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/98UNnQawGyUJ.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.