From e3603a60e97c94876809e0d8fcd984b8047f6dda Mon Sep 17 00:00:00 2001 From: nai-degen Date: Mon, 22 May 2023 21:02:11 -0500 Subject: [PATCH] follow-up to Accept header adjustment --- src/proxy/check-origin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proxy/check-origin.ts b/src/proxy/check-origin.ts index 49ef9b3..137341d 100644 --- a/src/proxy/check-origin.ts +++ b/src/proxy/check-origin.ts @@ -15,7 +15,7 @@ export const checkOrigin: RequestHandler = (req, res, next) => { { origin: req.headers.origin, referer: req.headers.referer }, "Blocked request from origin or referer" ); - if (!req.accepts("html") || req.accepts("*/*")) { + if (!req.accepts("html") || req.headers.accept === "*/*") { return res.status(403).json({ error: { type: "blocked_origin", message: config.blockMessage }, });