We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 517b9bd commit e01b6cdCopy full SHA for e01b6cd
apps/webapp/app/services/apiRateLimit.server.ts
@@ -87,7 +87,21 @@ export function authorizationRateLimitMiddleware({
87
if (log.requests) {
88
logger.info(`RateLimiter (${keyPrefix}): no key`);
89
}
90
- return res.status(401).send("Unauthorized");
+ res.setHeader("Content-Type", "application/problem+json");
91
+ return res
92
+ .status(401)
93
+ .send(
94
+ JSON.stringify(
95
+ {
96
+ title: "Unauthorized",
97
+ status: 401,
98
+ type: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401",
99
+ detail: "No authorization header provided",
100
+ },
101
+ null,
102
+ 2
103
+ )
104
+ );
105
106
107
const hash = createHash("sha256");
0 commit comments