Files
maildev-maildev/.changeset/fix-cid-attachment-url.md
T
dualfroz 15ecda681f fix: omit the base path prefix when it resolves to the root
A caller passing basePath '/' produced //api/email/..., which a browser reads as a protocol-relative URL rather than a path. Strip the slashes first and only add a prefix when something is left.
2026-09-17 16:18:50 +02:00

538 B

@maildev/smtp, @maildev/api
@maildev/smtp @maildev/api
patch patch

Fix the URL that replaceCidReferences rewrites inline (CID) attachments to. It built /email/:id/attachment/:file, which matches no route: the attachment is served from /api/email/:id/attachment/:file, under the configured base path. The URL is now root-relative and includes both parts, so it resolves at the root and under a subpath such as /mail. A base path that resolves to the root (/) adds no prefix, so it can no longer produce a protocol-relative //api/email/....