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 8f13689 commit 6c1ce9cCopy full SHA for 6c1ce9c
index.js
@@ -17,7 +17,7 @@ async function resize(url) {
17
const preset = "pr:sharp"
18
const src = url.pathname.split("/").slice(2).join("/");
19
const origin = new URL(src).hostname;
20
- if (allowedDomains.includes("*") && !allowedDomains.includes(origin)) {
+ if (!allowedDomains.includes("*") && !allowedDomains.includes(origin)) {
21
return new Response(`Domain (${origin}) not allowed. More details here: https://github.com/coollabsio/next-image-transformation`, { status: 403 });
22
}
23
const width = url.searchParams.get("width") || 0;
0 commit comments