mailinabox icon indicating copy to clipboard operation
mailinabox copied to clipboard

Add tor header to nginx web config

Open 4c3e opened this issue 2 years ago • 0 comments

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

4c3e avatar May 17 '22 02:05 4c3e