• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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