Listmonk

a year ago

Description: Self-hosted newsletter and mailing list manager

Category: Other

URL: https://railway.app/template/listmonk

7 Replies

a year ago

Notes:


ramiawarHOBBY

a year ago

How can we enable CORS from listmonk's side using this template?

I can't figure out how to modify the template myself, and I already have a prod server running.

I need this so that I can use the listmonk forms inside my public application.


a year ago

From a quick Google search, it doesn't look like listmonk has any CORS related settings.


ramiawarHOBBY

a year ago

They do not, what I found after a lot of searching was some github thread mentioning how this can be allowed with an Nginx reverse proxy. Not sure if this template is using nginx at all. If it is, then this could be configured manually by adding a CORS header there.

https://github.com/knadh/listmonk/issues/1523


a year ago

Yeah I did come across that, If that's the solution you would like me to pursue I can look into that, no promises though.


a year ago

CORS support has been added to any newly deployed templates with the LISTMONK_ORIGIN_0, LISTMONK_ORIGIN_1, etc variables (0-5).

But you already have listmonk deployed, so he's a short guide on how you would update your already deployed listmonk service -

  • If you have a single origin, add it to the LISTMONK_ORIGIN_0 variable, if you have multiple origins, use LISTMONK_ORIGIN_0, LISTMONK_ORIGIN_1, and so on. E.g "LISTMONKORIGIN0=https://domain.com" (no trailing slash)

  • Remove listmonk's start command.

  • Remove any source from the listmonk service.

  • Fork this repository.

  • Connect the forked repository to your listmonk service.

Let me know if you need any clarification and if that works to enable cors for you!


david-torresHOBBY

18 days ago

I needed to talk to my Listmonk instance over the private network. I've opened this PR that addresses this issue by starting Listmonk listening on IPv6: https://github.com/railwayapp-templates/listmonk/pull/4