web: fix error from trying to clone the request

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-09 00:38:43 +02:00
parent 7a836e0d7e
commit e1f7421c6a
1 changed files with 1 additions and 9 deletions

View File

@ -9,16 +9,8 @@ export class LoggingMiddleware implements Middleware {
tenant().then(tenant => {
let msg = `authentik/api[${tenant.matchedDomain}]: `;
msg += `${context.response.status} ${context.init.method} ${context.url}`;
if (context.response.status >= 400) {
const resClone = context.response.clone();
resClone.text().then(t => {
msg += ` => ${t}`;
console.debug(msg);
});
} else {
console.debug(msg);
}
});
return Promise.resolve(context.response);
}