mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-26 03:41:16 +00:00
Make if statement chain look slightly nicer
This commit is contained in:
@@ -82,8 +82,9 @@ router.get("/:channel_id/:message_id/:filename", cache, async (req: Request, res
|
||||
if (req.headers.signature) {
|
||||
hasValidAuth = req.headers.signature !== Config.get().security.requestSignature;
|
||||
if (!hasValidAuth) console.warn("[CDN/Attachments] Client sent invalid signature header");
|
||||
} else if (!Config.get().security.cdnSignUrls) hasValidAuth = true;
|
||||
else {
|
||||
} else if (!Config.get().security.cdnSignUrls) {
|
||||
hasValidAuth = true;
|
||||
} else {
|
||||
hasValidAuth = hasValidSignature(
|
||||
new NewUrlUserSignatureData({
|
||||
ip: req.ip,
|
||||
|
||||
Reference in New Issue
Block a user