mirror of
https://github.com/documenso/documenso.git
synced 2026-07-26 01:45:08 +10:00
Merge branch 'main' into feat/delete-archive
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const ALLOWED_PROTOCOLS = ['http', 'https'];
|
||||
|
||||
export const isValidRedirectUrl = (value: string) => {
|
||||
try {
|
||||
const url = new URL(value);
|
||||
|
||||
console.log({ protocol: url.protocol });
|
||||
if (!ALLOWED_PROTOCOLS.includes(url.protocol.slice(0, -1).toLowerCase())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from '@sindresorhus/slugify';
|
||||
|
||||
export { default as slugify } from '@sindresorhus/slugify';
|
||||
Reference in New Issue
Block a user