Closed Caroladao closed 4 years ago
Its a WordPress blog
@Caroladao The root of the issue is the MIME type / content type should be application/javascript
instead of application/octet-stream
.
The OneSignal Wordpress Plugin already correctly sets Content-Type: application/javascript
noted below.
https://github.com/OneSignal/OneSignal-WordPress-Plugin/blob/master/sdk_files/OneSignalSDKWorker.js.php#L8
This points to some other plugin in your Wordpress modifying HTTP headers. Possibly some caching or CDN plugin. It could also be a nginx or apache configuration issue depending on how your site is hosted.
I moved this ticket to the Wordpress repo from general OneSignal-Website-SDK repo.
Closing due to inactivity
Description: Its showing this message: ServiceWorkerManager.js:392 [Service Worker Installation] Installing service worker failed SecurityError: Failed to register a ServiceWorker for scope ('mysite') with script ('mysite/app/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php?appId=...'): The script has an unsupported MIME type ('application/octet-stream').