maildump icon indicating copy to clipboard operation
maildump copied to clipboard

virtual hosting in subfolders

Open frisi opened this issue 9 years ago • 1 comments

we're using maildump for testing emails send by our web application. i'm running it with /maildumpctl --http-ip 0.0.0.0

i'd like to have access to the webinterface via http://yourproject.com/maildump with the following nginx rule

location /maildump {
        rewrite ^/maildump/?(.*)$  /$1 break;
        proxy_pass http://internal.server:1080;
    }

unfortunately maildump tries to fetches all other resources directly from / (eg /static/*, messages, socket.io)

so we need the following additional rules that might clash with our webapplication:

    location /static/ {
        proxy_pass http://internal.server:1080;
    }
    location /messages/ {
        proxy_pass http://internal.server:1080;
    }
    location /socket.io/ {
        proxy_pass http://internal.server:1080;
    }

any plans to support virtual hosting via a -vhost-path=maildump argument?

frisi avatar Jun 03 '16 14:06 frisi

I wonder if there's a cleaner way.. in a typical wsgi app there are env vars available to handle it automatically but I guess here that's not possible.

Anyway, if you submit a pull request to add this functionality using a new commandline argument I wouldn't mind adding it.

ThiefMaster avatar Jun 03 '16 14:06 ThiefMaster