diff --git a/templates/web/src/client.ts.twig b/templates/web/src/client.ts.twig index 07d67ac77..174810fa1 100644 --- a/templates/web/src/client.ts.twig +++ b/templates/web/src/client.ts.twig @@ -544,6 +544,13 @@ class Client { headers = Object.assign({}, this.headers, headers); + if (typeof window !== 'undefined' && window.localStorage) { + const cookieFallback = window.localStorage.getItem('cookieFallback'); + if (cookieFallback) { + headers['X-Fallback-Cookies'] = cookieFallback; + } + } + let options: RequestInit = { method, headers,