follow-up to Accept header adjustment

This commit is contained in:
nai-degen 2023-05-22 21:02:11 -05:00
parent b24894d98f
commit e3603a60e9
1 changed files with 1 additions and 1 deletions

View File

@ -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 },
});