fix(tracearr): support absolute image urls (#5654)
* Update base URL handling for tracearr integration * fix: remove unnecessary prefix from bcrypt hashing * refactor: add is-absolute-url check * test: add unit tests --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
1 parent
db61b6f390
commit
7a1272146c
3 files changed
+34
-30
No files matched your search
@@ -38,3 +38,9 @@ export const getPortFromUrl = (url: URL): number => {
|
||||
|
||||
throw new Error(`Unsupported protocol: ${url.protocol}`);
|
||||
};
|
||||
|
||||
const absoluteUrlRegex = /^[a-z]+:(\/\/)?/;
|
||||
|
||||
export const isAbsoluteUrl = (urlOrPath: string): boolean => {
|
||||
return absoluteUrlRegex.test(urlOrPath.toLowerCase());
|
||||
};
|
||||
Reference in new issue
Block a user