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 932683f commit 5ffea78Copy full SHA for 5ffea78
1 file changed
lib/util/url.ts
@@ -200,6 +200,11 @@ export function isUnsafeUrl(path: string): boolean {
200
return true;
201
}
202
203
+ // if we're in the browser, we assume that it is safe
204
+ if (typeof window !== "undefined" && window.location && window.location.href) {
205
+ return false;
206
+ }
207
+
208
// Local/internal network addresses
209
const localPatterns = [
210
// Localhost variations
0 commit comments