perusio / drupal-with-nginx

Running Drupal using nginx: an idiosyncratically crafted bleeding edge configuration.
855 stars 246 forks source link

Add File Type "image/svg+xml" for Compression #268

Open deminy opened 7 years ago

deminy commented 7 years ago

I noticed that Drupal 8 logos didn't show up properly. In Chrome following message shown up when trying to visit http://example.com/core/themes/bartik/logo.svg (here "example.com" is a Drupal 8 site)

This site can’t be reached The webpage at http://example.com/core/themes/bartik/logo.svg might be temporarily down or it may have moved permanently to a new web address. ERR_CONTENT_DECODING_FAILED

Similar issue happens in Firefox and Safari as well. However, from what I remember it didn't happen before, so I assume it probably happens only with latest Nginx and/or latest Drupal.

To fix it, I added type "image/svg+xml" for gzip compression.

deminy commented 7 years ago

Forgot to mention that my installation has Nginx module PageSpeed included. After the patch I also need to flush PageSpeed cache folder to make it work.