How to alter HTTP headers for specific static content?

How to alter HTTP headers for specific static content?

Petrov_Maestra
Visitor
1 0 0

Hello!

We're looking for a way to enable web push notifications for our users and need to use the functionality of a service worker located on an external domain. We're trying to reference it via importScripts() within our service worker file hosted on Shopify. However, due to the "sandbox" directive in the Content-Security-Policy header, the code is unable to execute in some browsers (e.g. Chrome).

Is there a way to modify the HTTP headers for specific files, such as service worker files? We'd like to add the 'allow-same-origin' token to Content-Security-Policy header.

Thanks for your assistance!

Replies 0 (0)