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.
12 lines
538 B
Markdown
12 lines
538 B
Markdown
---
|
|
'@maildev/smtp': patch
|
|
'@maildev/api': 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/...`.
|