diff --git a/src/site/api/proxy.js b/src/site/api/proxy.js index 7273c89..b8156a9 100644 --- a/src/site/api/proxy.js +++ b/src/site/api/proxy.js @@ -52,7 +52,7 @@ module.exports = [ route: "/imageproxy", methods: ["GET"], code: async (input) => { const verifyResult = verifyURL(input.url) if (verifyResult.status !== "ok") return verifyResult.value - if (!["png", "jpg"].some(ext => verifyResult.url.pathname.endsWith(ext))) return [400, "URL extension is not allowed"] + if (!["png", "jpg", "webp"].some(ext => verifyResult.url.pathname.endsWith(ext))) return [400, "URL extension is not allowed"] const params = input.url.searchParams const width = +params.get("width") if (typeof width === "number" && !isNaN(width) && width > 0) {