ActivityPub-federated video streaming platform using P2P directly in your web browser
Prevent exception when headers are already sent
Chocobozzz848347f193ca
diff --git a/server/middlewares/error.ts b/server/middlewares/error.tsindex 7b116eb574..540edaeeb0 100644--- a/server/middlewares/error.ts+++ b/server/middlewares/error.ts@@ -18,7 +18,10 @@ function apiFailMiddleware (req: express.Request, res: express.Response, next: e})res.status(status)- res.setHeader('Content-Type', 'application/problem+json')++ if (!res.headersSent) {+ res.setHeader('Content-Type', 'application/problem+json')+ }const json = new ProblemDocument({status,