pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.36k stars 68 forks source link

[Feature Request] Support for base URL/subfolder reverse proxy #77

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm currently able to successfully proxy my instance of Keila via keila.mydomain.com, but I'd love to have the ability to use a subfolder (app.mydomain.com/keila) instead.

Is this something that could be considered in a future release?

wmnnd commented 2 years ago

Hey there, this is absolutely possible! Would you be up for creating a PR for this?

You’d need to add the :path option to the config of KeilaWeb.Endpoint, :url. It should default to "/" and could be overwritten with URL_PATH.

This is the relevant bit of code: https://github.com/pentacent/keila/blob/main/config/runtime.exs#L117

ghost commented 2 years ago

I'd love to help, but I'm not a developer nor have I ever written code. Is there another way I could assist with this?

pascalwengerter commented 2 years ago

I'd like to give it a try, can't promise by when I can find the time though..

wmnnd commented 2 years ago

@es9o Could you give the branch in #78 a try?

wmnnd commented 2 years ago

This feature has now been merged and released in Keila 0.6.2!

cinco commented 1 year ago

hi guys,

the websocket URL is not considering the URL_PATH.

In the console I get mydomain.com/live/websocket?_csrf_token=...., even though I have URL_PATH=/newsletter.

While you would expect the websocket at mydomain.com/newsletter/live/websocket?_csrf_token=....