I just want to tell you how to tell a Tor visitor that you have onion.

This commit is contained in:
Alexander Andreev 2021-09-24 21:53:59 +04:00
parent a5e5db12c9
commit dd3d818f04
Signed by: Arav
GPG Key ID: 610DF2574456329F
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,7 @@ block article
li #[a(href='#art-1') Introduction]
li #[a(href='#art-2') Userdir functionality like Apache's mod_userdir]
li #[a(href='#art-3') Note on how NGiNX works with HTTP headers]
li #[a(href='#art-3') Tell a Tor visitor of your clearnet site that you have an onion]
h3#art-1 #[a(href='#art-1') 1. Introduction]
p Here I'll place recipes for implementing different functionalities and notes on webserver's behaviour.
@ -31,3 +32,9 @@ block article
h3#art-3 #[a(href='#art-3') 3. Note on how NGiNX works with HTTP headers]
p Let's say in #[code http] block you specified common headers like #[code X-Frame-Options], #[code X-XSS-Protection], and so on for all #[code server] directives to use. But, if you add some other header for a specific #[code server] or #[code location] block then all those headers would be dropped.
p For now the only cure for it is to place all that headers in a separate file like #[code common-headers.inc] and using #[code include] directive to include them in all the #[code server] and #[code location] blocks where additional headers are added.
h3#art-4 #[a(href='#art-3') 4. Tell a Tor visitor of your clearnet site that you have an onion]
p There is a custom HTTP header #[code Onion-Location] that is being recognised by Tor Browser and it will show a ".onion available" button in an address bar.
p The code for NGiNX is this simple:
pre
| add_header Onion-Location http://yoursite.onion$request_uri;