fix: fix subdomain retrieval
All checks were successful
Update changelog / changelog (push) Successful in 25s

This commit is contained in:
2026-01-08 13:20:32 +01:00
parent 066b9884c2
commit 681555fef8

View File

@@ -91,7 +91,7 @@ AppDataSource.initialize().then(async () => {
// Retrieve url, subdomain from request.
let uri: string = req.url.slice(1); // discards / from /abc, /abc -> abc
let subdomain: string | null = req.headers.host!.replace(rs.fqdn, '') || null;
let subdomain: string | null = req.headers.host!.replace(rs.fqdn, '').slice(0, -1) || null; // slice() to remove trailing dot
// Try to lookup the url in DB
const reversedLink: Link | null = await linkService.lookupUriWithExpiryValidation(uri, subdomain);