web: fix error from trying to clone the request
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7a836e0d7e
commit
e1f7421c6a
|
@ -9,15 +9,7 @@ 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);
|
||||
}
|
||||
console.debug(msg);
|
||||
});
|
||||
return Promise.resolve(context.response);
|
||||
}
|
||||
|
|
Reference in a new issue