CDN Settings Page .htaccess Modification Problem
-
I’ve spent the last couple of days trying to get my StackPath CDN working with LiteSpeed Cache WordPress plugin via your CDN Settings page. I’ve finally found a combination of settings that work, but I need to stop your plugin from adding the following section to my .htaccess file every time I save the plugin settings.
### marker CORS start ###
<FilesMatch “\.(ttf|ttc|otf|eot|woff|woff2|font\.css)$”>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin “*”
</IfModule>
</FilesMatch>
### marker CORS end ###Without this entry, things are working fine, but Chrome stops loading web fonts and displays multiple errors like the one below as soon as the above entry is added to .htaccess.
Access to font at ‘https://cdn.martinbaileyphotography.com/wp-content/plugins/social-warfare/assets/fonts/sw-icon-font.woff?ver=3.6.1’ from origin ‘https://martinbaileyphotography.com’ has been blocked by CORS policy: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed.
Would it be possible to add a checkbox to the settings that can be turned off for anyone that does not want the .htaccess file to be updated when saving settings? Or are you aware of any other way that I could safely stop this from happening without having to update code every time an update to your plugin is released?
Thanks in advance for any help or advice you can provide.
The page I need help with: [log in to see the link]
- The topic ‘CDN Settings Page .htaccess Modification Problem’ is closed to new replies.