diff --git a/CHANGELOG.md b/CHANGELOG.md index 54b5c58..8f999fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to project will be documented in this file. +## [2.3.3](https://github.com/roadiz/skeleton/compare/v2.3.2...v2.3.3) - 2024-05-28 + +### Features + +- Allow exposing `Cache-Tags` header when Varnish serve API and Nuxt responses - ([0833570](https://github.com/roadiz/skeleton/commit/083357092318e9b08ba400a5270457d563655f10)) - Ambroise Maupate + ## [2.3.1](https://github.com/roadiz/skeleton/compare/v2.3.0...v2.3.1) - 2024-05-16 ### Bug Fixes diff --git a/config/packages/nelmio_cors.yaml b/config/packages/nelmio_cors.yaml index a984905..8f22b00 100644 --- a/config/packages/nelmio_cors.yaml +++ b/config/packages/nelmio_cors.yaml @@ -3,8 +3,8 @@ nelmio_cors: origin_regex: true allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT'] - allow_headers: ['Content-Type', 'Authorization', 'Www-Authenticate', 'x-g-recaptcha-response'] - expose_headers: ['Link', 'Www-Authenticate'] + allow_headers: ['Content-Type', 'Authorization', 'Www-Authenticate', 'x-g-recaptcha-response', 'Cache-Tags'] + expose_headers: ['Link', 'Www-Authenticate', 'Cache-Tags'] max_age: 3600 paths: '^/': ~ diff --git a/docker/varnish/default.vcl b/docker/varnish/default.vcl index f8485ec..e79245c 100644 --- a/docker/varnish/default.vcl +++ b/docker/varnish/default.vcl @@ -195,9 +195,9 @@ sub vcl_deliver { # # You can do accounting or modifying the final object here. - # Remove cache-tags, unless you want Cloudflare or other to see them + # Remove cache-tags, unless you want Cloudflare or Nuxt to see them (to use cache tags on Nuxt responses) + # Make sure to allow CORS on Cache-Tags header if you want to use it on Nuxt. unset resp.http.X-Cache-Tags; - # Comment the following line to send the "Cache-Tags" header to the client (e.g. to use CloudFlare cache tags) unset resp.http.Cache-Tags; }