This commit is contained in:
BlueSkiesAndGreenPastures
2025-06-23 13:42:45 -05:00
parent 0b14d1110c
commit c0c844ed84
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ const getUrl = (ctx: AppContext, req: Request, id: string) => {
if (!ctx.cfg.service.hostnames.length) {
assert(req.headers.host, 'request must be made with host header')
const baseUrl =
req.protocol === 'http' && req.headers.host!.startsWith('localhost:')
req.protocol === 'http' && req.headers.host.startsWith('localhost:')
? `http://${req.headers.host}`
: `https://${req.headers.host}`
return `${baseUrl}/${id}`
+1 -1
View File
@@ -173,7 +173,7 @@ describe('link service', async () => {
// League of Legends is set to WARN, not BLOCK, so expect a warning (blocked-site div present)
assert.match(
html,
/"Warning: Malicious Link/,
/Warning: Malicious Link/,
'Expected warning not found in HTML',
)
})