Skip to content

Commit

Permalink
Change readonly response status to 451 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsitnikov authored Dec 15, 2023
1 parent 16cef7a commit d43a2fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/middlewares/check-read-only-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const checkReadOnlyMode = (req: Request, res: Response, next: NextFunctio

if (readOnlyMode && req.routeInfo.write) {
req.ctx.logError(US_ERRORS.READ_ONLY_MODE_ENABLED);
res.status(503).send({code: US_ERRORS.READ_ONLY_MODE_ENABLED});
res.status(451).send({code: US_ERRORS.READ_ONLY_MODE_ENABLED});
return;
}

Expand Down

0 comments on commit d43a2fa

Please sign in to comment.