Skip to content

Commit ec5b065

Browse files
authored
Merge pull request #447 from skip-mev/fix-middleware
fix middleware
2 parents 994cb73 + 91390b1 commit ec5b065

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/middleware.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const cleanOrigin = (str: string) => {
1919

2020
return domain;
2121
} catch (error) {
22-
console.error("error", error);
2322
return str; // Return the original string if it's not a valid URL
2423
}
2524
};
@@ -39,7 +38,7 @@ const isNetlifyPreview = (str: string) => {
3938
};
4039

4140
const isCloudflarePreview = (str: string) => {
42-
if (str.endsWith("pages.dev") || "trycloudflare.com") {
41+
if (str.endsWith("pages.dev") || str.endsWith("trycloudflare.com")) {
4342
return true;
4443
}
4544
return false;

0 commit comments

Comments
 (0)