Run prettier
This commit is contained in:
parent
1bf2424033
commit
b73b4e9502
@ -55,7 +55,7 @@ export const NO_AUTHORIZATION_ROUTES = [
|
|||||||
// Connections
|
// Connections
|
||||||
/POST \/connections\/\w+\/callback/,
|
/POST \/connections\/\w+\/callback/,
|
||||||
// Image proxy
|
// Image proxy
|
||||||
/GET \/imageproxy\/[A-Za-z0-9+/]\/\d+x\d+\/.+/
|
/GET \/imageproxy\/[A-Za-z0-9+/]\/\d+x\d+\/.+/,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const API_PREFIX = /^\/api(\/v\d+)?/;
|
export const API_PREFIX = /^\/api(\/v\d+)?/;
|
||||||
|
@ -67,7 +67,12 @@ export async function ImageProxy(req: Request, res: Response) {
|
|||||||
if (!crypto.timingSafeEqual(Buffer.from(hash), Buffer.from(path[0])))
|
if (!crypto.timingSafeEqual(Buffer.from(hash), Buffer.from(path[0])))
|
||||||
throw new Error("Invalid signature");
|
throw new Error("Invalid signature");
|
||||||
} catch {
|
} catch {
|
||||||
console.log("[ImageProxy] Invalid signature, expected " + hash + " but got " + path[0]);
|
console.log(
|
||||||
|
"[ImageProxy] Invalid signature, expected " +
|
||||||
|
hash +
|
||||||
|
" but got " +
|
||||||
|
path[0],
|
||||||
|
);
|
||||||
res.status(403).send("Invalid signature");
|
res.status(403).send("Invalid signature");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user