App Proxy removes custom headers

Solved
KiranD
New Member
1 0 0

Hello

 

0 Likes
Damiansia
New Member
1 0 0

Hello @Shayne , we have implemented the followings: 

- service-worker.js is now served via an app-proxy and it can be loaded.

- service-worker.js is served with header Service-Worker-Allowed: /

- use scope "/" when registering service worker. i.e. navigator.serviceWorker.register('/tools/web-worker/service-worker.js', { scope: "/" })

However, it is still not working, and it is giving us this error during the worker registration:

The path of the provided scope ('/') is not under the max scope allowed ('/tools/web-worker/'). Adjust the scope, move the Service Worker script, or use the Service-Worker-Allowed HTTP header to allow the scope.

Would you be able to advise what could we do to fix this issue. Thank you!

0 Likes