• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Push Notification Service Worker Files not being served as "Content-Type: application/javascript"

Sally1

Regular Pleskian
Hello,


My site runs the OneSignal web push notifications plugin ans I have some issues with the service worker files not being served as "Content-Type: application/javascript".


OS‪CentOS Linux 7.7.1908 (Core)‬
ProductPlesk Obsidian
Version 18.0.23 Update #4, last updated on Feb 11, 2020 03:41 AM

Apache and Nginx Reverse Proxy.

Additional directives for http and https:

# TTFB
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 100
# Allow Origin
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin *
</IfModule>


Additional Nginx directives:


gzip on;
gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/html text/javascript text/plain text/xml;



I would need the following URLs to be served as with this content-type:

yoursite.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php

yoursite.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKUpdaterWorker.js.php

How can I fix this?

Thx
Sally
 
Back
Top