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:
StrandedTurtleandMeier Lukas authored and GitHub committed 2026-05-18 21:39:01 +02:00
1 parent db61b6f390
commit 7a1272146c
3 files changed
+34 -30

No files matched your search

+6
View File
@@ -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());
};