mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(federation): 🐛 Make HTTP header validation lowercase
This commit is contained in:
parent
9a917e2801
commit
df5e06ca8a
|
|
@ -39,9 +39,9 @@ export const schemas = {
|
|||
uuid: z.string().uuid(),
|
||||
}),
|
||||
header: z.object({
|
||||
"X-Signature": z.string(),
|
||||
"X-Nonce": z.string(),
|
||||
"X-Signed-By": z.string().url().or(z.literal("instance")),
|
||||
"x-signature": z.string(),
|
||||
"x-nonce": z.string(),
|
||||
"x-signed-by": z.string().url().or(z.literal("instance")),
|
||||
authorization: z.string().optional(),
|
||||
}),
|
||||
body: z.any(),
|
||||
|
|
@ -57,9 +57,9 @@ export default apiRoute((app) =>
|
|||
async (context) => {
|
||||
const { uuid } = context.req.valid("param");
|
||||
const {
|
||||
"X-Signature": signature,
|
||||
"X-Nonce": nonce,
|
||||
"X-Signed-By": signedBy,
|
||||
"x-signature": signature,
|
||||
"x-nonce": nonce,
|
||||
"x-signed-by": signedBy,
|
||||
authorization,
|
||||
} = context.req.valid("header");
|
||||
const logger = getLogger(["federation", "inbox"]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue