• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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