mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.

Home Page:https://mailinabox.email/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add tor header to nginx web config

4c3e opened this issue · comments

commented

Hello! Thanks for this great project, my webmail and personal site have been working for over a year now without a hitch.

I currently run a .onion mirror of my website reachable using the tor network. Tor has a http header which the tor browser uses to redirect users from my clearnet site, to the tor mirror. It requires the following line added to the nginx server:

server {
...
    add_header Onion-Location http://someonionurl
}

My understanding is that mailinthebox automatically generates the nginx config files so just adding this to the existing nginx config wouldn't work. Is there any way to add this config to the nginx conf generation script?

Thanks again.

Edit: For those who are actually knowledgeable about nginx and miab, I think this could be done by modifying https://github.com/mail-in-a-box/mailinabox/blob/main/management/web_update.py