sparkfabrik / docker-php-drupal-nginx

Docker NGINX php container
4 stars 4 forks source link

HTTP caching issues while using the subfolder.conf file #17

Open paolomainardi opened 5 years ago

paolomainardi commented 5 years ago

When using this image with the subfolder.conf configuration file, we basically miss all the needed caching headers on the static assets, we should backport this configuration: https://github.com/sparkfabrik/docker-php-drupal-nginx/blob/feature/d8/1.13.6-alpine/templates/default.conf#L100

To avoid problems like this one:

 ❯ curl -I https://www.example.com/de/de/themes/custom/example_corporate/images/logo.svg                                                     ✭
HTTP/2 200
server: nginx
date: Wed, 03 Apr 2019 11:05:09 GMT
content-type: image/svg+xml
content-length: 4621
last-modified: Wed, 03 Apr 2019 09:06:15 GMT
vary: Accept-Encoding
etag: "5ca47787-120d"
accept-ranges: bytes
via: 1.1 google
alt-svc: clear
paolomainardi commented 5 years ago

cc @marcogiacomassi @Pinolo