Explorar o código

fix(auth): passing the invalidate cache header (#697)

Karol Sójko hai 1 ano
pai
achega
83ad069c5d

+ 4 - 0
packages/auth/src/Infra/InversifyExpressUtils/Base/BaseAuthController.ts

@@ -285,6 +285,10 @@ export class BaseAuthController extends BaseHttpController {
       authorizationHeader: <string>request.headers.authorization,
     })
 
+    if (result.headers?.has('x-invalidate-cache')) {
+      response.setHeader('x-invalidate-cache', result.headers.get('x-invalidate-cache') as string)
+    }
+
     return this.json(result.data, result.status)
   }