• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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