tenants: add tests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-05-29 19:47:55 +02:00
parent e3578eb7ae
commit 8427fb87f6
8 changed files with 49 additions and 7 deletions

View File

@ -6,7 +6,9 @@ import { MessageMiddleware } from "../elements/messages/Middleware";
export class LoggingMiddleware implements Middleware {
post(context: ResponseContext): Promise<Response | void> {
console.debug(`authentik/api: ${context.response.status} ${context.init.method} ${context.url}`);
tenant().then(tenant => {
console.debug(`authentik/api[${tenant.matchedDomain}]: ${context.response.status} ${context.init.method} ${context.url}`);
});
return Promise.resolve(context.response);
}