Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Support for Configurable Base Path in WebAdmin Interface #51

Open
Sofahamster opened this issue Dec 25, 2024 · 0 comments

Comments

@Sofahamster
Copy link

Hi,

I would like to propose an enhancement to add support for a configurable base path (or base URL) for the WebAdmin interface. This feature would make it easier to deploy the interface behind a reverse proxy, such as Nginx, when serving it on a subfolder (subpath) rather than the root URL.

For example:
If the WebAdmin interface is served at https://domain.tld/stalwartadmin/, the application should be able to handle the /stalwartadmin/ prefix in URLs seamlessly.

The nginx configuration would probably look like this:

location /stalwartadmin/ {
  proxy_pass https://localhost:8080/;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Proto $scheme;
}

Many modern web interfaces allow working behind reverse proxies on a sub-path, for example gitea allows setting the ROOT_URL, and the rspamd web interface even works on a sub-path without any configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant