-
|
I believe this project (Bulwark) is geared toward integration with a Stalwart JMAP mail server. However, no matter what I do, I can't seem to get around a CORS failure when trying to use Bulwark. I have Stalwart up and running with Bulwark on the same Docker host. However, whenever I try to log in to Bulwark, I receive the following error: The server is reachable but is blocking cross-origin requests. Check your JMAP server's CORS settings and allow this domain. Stalwart is configured with Relaxed CORS, and I can see the connection is properly passing the CORS header: It more looks like a Stalwart issue, to be honest. It appears Stalwart is not building the pre-flight correctly for the https://mail.example.com/.well-known/jmap and is producing a 204 with a bad content length. Bulwark sees this as a CORS failure and stops. Anybody else having issues getting Bulwark working with Stalwart and seeing a CORS failure? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
What Bulwark is flagging there is not just a missing Bulwark does a browser-side So yes, this sounds more like a Stalwart or proxy-side preflight issue than a Bulwark-specific bug. Things to verify:
Also, being on the same Docker host does not make it same-origin from the browser's perspective. If you have nginx, Traefik, Caddy, Cloudflare, or another proxy in front of Stalwart, I would inspect that layer first. It is very plausible the proxy is generating or altering the As a workaround, putting Bulwark and the JMAP endpoint behind the same origin avoids the browser CORS path entirely. |
Beta Was this translation helpful? Give feedback.
-
|
I had to add in the Stalwart configuration My Bulwark and Stalwart are on two different origins. I think it's hard to have both on the same origins as you need to enumerate which path goes to Stalwart for JMAP explicitely. |
Beta Was this translation helpful? Give feedback.
-
|
I ended up adding a middleware header rewrite to Traefik to null out the content length. This has resolved my issue for now. I’ve also opened an issue on Stalwart to get them to address the RFC violation. |
Beta Was this translation helpful? Give feedback.
I ended up adding a middleware header rewrite to Traefik to null out the content length. This has resolved my issue for now. I’ve also opened an issue on Stalwart to get them to address the RFC violation.