diff --git a/src/modules/auth/auth.controller.ts b/src/modules/auth/auth.controller.ts index 163ec64..b31ada8 100644 --- a/src/modules/auth/auth.controller.ts +++ b/src/modules/auth/auth.controller.ts @@ -88,10 +88,11 @@ export class AuthController { async signIn( @Body() { username, password, totp }: AuthSignInReq, @Language() language: LanguageEnum, - @Headers('host') host: string + @Headers('origin') origin: string ): Promise { this.logger.info('/auth - SignIn'); - const metadata = PackTheMetadata({ language, custom_host: host }); + const frontHost = origin.replace(/^https?:\/\//, ''); + const metadata = PackTheMetadata({ language, custom_host: frontHost }); this.logger.info('metadata: ' + JSON.stringify(metadata.toJSON())); return this.authClient.signIn({ username, password, totp }, metadata); }