diff --git a/README.md b/README.md index 25d8647..d6509c9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ composer require acpl/flarum-lscache:"*" RewriteEngine On RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ # Detection of logged-in user. - RewriteRule .* - [E="Cache-Vary:flarum_remember,flarum_lscache_vary"] + RewriteRule .* - [E="Cache-Vary:flarum_remember,flarum_lscache_vary,locale"] # If you have a non-default path to the admin panel, change "admin" to match. RewriteCond %{ORG_REQ_URI} !/admin # Enable private cache for admin panel. If it causes problems replace "private" with "no-cache". diff --git a/src/Middleware/VaryCookieMiddleware.php b/src/Middleware/VaryCookieMiddleware.php index 120569a..088376c 100644 --- a/src/Middleware/VaryCookieMiddleware.php +++ b/src/Middleware/VaryCookieMiddleware.php @@ -35,7 +35,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $response = $response->withHeader( LSCacheHeadersEnum::VARY, - "cookie={$this->cookie->getName(LSCache::VARY_COOKIE)},cookie={$this->cookie->getName('remember')}", + "cookie={$this->cookie->getName(LSCache::VARY_COOKIE)},cookie={$this->cookie->getName('remember')},cookie=locale", ); $user = RequestUtil::getActor($request);