Do not set locale cookie for API requests

https://t.me/blessing_skin/184899
This commit is contained in:
Steven Qiu 2025-06-22 17:43:57 +08:00 committed by GitHub
parent 186138b884
commit 8f07b82c14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,10 @@ class DetectLanguagePrefer
/** @var Response */
$response = $next($request);
if (!in_array('api', $request->route()->middleware())) {
$response->cookie('locale', $locale, 120);
}
$response->cookie('locale', $locale, 120);
return $response;