Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
docs: how to run with reverse proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
muety committed Feb 26, 2023
1 parent b82a740 commit 44d5705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -51,7 +51,7 @@ $ cd webui/
$ yarn && yarn build
$ cd ..
# 4. Compile API
$ GO111MODULE=on go build
$ go build

# 5. Run it
$ ./mailwhale
Expand Down Expand Up @@ -113,6 +113,9 @@ $ docker run -d \

**Note:** An official Docker image is about to come. Also, there will be no need to mount your config file into the container, as everything will be configurable using environment variables eventually.

### Reverse Proxy
To run this app behind a reverse proxy, see [here](https://github.com/muety/wakapi/wiki/Reverse-Proxy) for example configurations for different web servers (works analogously for MailWhale). In addition, `MW_WEB_PUBLIC_URL` (or `web.public_url`, respectively) must be configured accordingly (set to the absolute URL of your MailWhale instance). Also see [#43](https://github.com/muety/mailwhale/issues/43).

## 鈱笍 Usage

First of all, you can get most tasks done through the web UI, available at <http://localhost:3000>.
Expand Down
3 changes: 3 additions & 0 deletions webui/src/stores/config.js
Expand Up @@ -12,6 +12,9 @@ const reservedRoutes = new Set([
function createConfig() {
let parts = location.pathname.split('/')
let basePath = parts.length >= 2 ? parts[1] : ''
// if app is served under root path ('/'), but initial entrypoint is a client-side route, e.g. '/clients' then that route would be considered the base path
// this hacky solution prevents this
// TODO: use router's API to check the app's client-side root route instead
if (reservedRoutes.has(basePath)) {
basePath = ''
}
Expand Down

0 comments on commit 44d5705

Please sign in to comment.