Can you please esqualate my ticket? I have the Pro Plan and should get an answer within 3 days
#2769595
Can you please esqualate my ticket? I have the Pro Plan and should get an answer within 3 days
#2769595
Unfortunately, that’s not the case and hasn’t been for a while.
Maybe we can help here, what is the issue?
I am trying to implement OneSignal, but I keep getting this error when registering the service worker. How do I change the MIME type?
I tried this, but it doesn’t seem to work
go to sites → rules → transform rules → response headers
When URI ends with js set response header Content-Type text/javascript
Error registering service worker: DOMException: Failed to register a ServiceWorker for scope (my website) The script has an unsupported MIME type (‘text/html’).
Can you provide an URL to check this? The rule, from your description looks ok, but I can’t be sure.
That sounds like you’re hitting a 404 and SPA behaviour is kicking in or you’re maybe hitting a WAF/Firewall Rules and being challenged.
I’d check what the HTML being returned actually is, changing the mime type wouldn’t help if it isn’t returning JS.
Thank you so much for the support. I fixed it. It turns out that the .js file was in the wrong folder.
Since I am coding vuejs with nuxt, it had to be placed in the static folder
Thank you so much for the inspiration of the not found.
I fixed it. It turns out that the .js file was in the wrong folder.
Since I am coding vuejs with nuxt, it had to be placed in the static folder
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.