1
0
mirror of https://github.com/dutchcoders/transfer.sh.git synced 2020-11-18 19:53:40 -08:00

removed enforcing of https for .onion

This commit is contained in:
Remco 2014-11-14 23:30:09 +01:00
parent 9d91c0640b
commit 0ec05a1888
3 changed files with 2 additions and 7 deletions

View File

@ -584,11 +584,6 @@ func RedirectHandler(h http.Handler) http.HandlerFunc {
} else if ipAddrFromRemoteAddr(r.Host) == "127.0.0.1" { } else if ipAddrFromRemoteAddr(r.Host) == "127.0.0.1" {
} else if ipAddrFromRemoteAddr(r.Host) == "transfersh.elasticbeanstalk.com" { } else if ipAddrFromRemoteAddr(r.Host) == "transfersh.elasticbeanstalk.com" {
} else if ipAddrFromRemoteAddr(r.Host) == "jxm5d6emw5rknovg.onion" { } else if ipAddrFromRemoteAddr(r.Host) == "jxm5d6emw5rknovg.onion" {
if r.Header.Get("X-Forwarded-Proto") != "https" && r.Method == "GET" {
http.Redirect(w, r, "https://jxm5d6emw5rknovg.onion"+r.RequestURI, 301)
return
}
} else if ipAddrFromRemoteAddr(r.Host) == "transfer.sh" { } else if ipAddrFromRemoteAddr(r.Host) == "transfer.sh" {
if r.Header.Get("X-Forwarded-Proto") != "https" && r.Method == "GET" { if r.Header.Get("X-Forwarded-Proto") != "https" && r.Method == "GET" {
http.Redirect(w, r, "https://transfer.sh"+r.RequestURI, 301) http.Redirect(w, r, "https://transfer.sh"+r.RequestURI, 301)

View File

@ -385,7 +385,7 @@
<section id="tor"> <section id="tor">
<div class="wrapper"> <div class="wrapper">
<a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/> <a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/>
<a href="https://jxm5d6emw5rknovg.onion/">https://jxm5d6emw5rknovg.onion/</a> <a href="http://jxm5d6emw5rknovg.onion/">http://jxm5d6emw5rknovg.onion/</a>
</div> </div>
</section> </section>

View File

@ -359,7 +359,7 @@ include "includes/head.html"
<section id="tor"> <section id="tor">
<div class="wrapper"> <div class="wrapper">
<a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/> <a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/>
<a href="https://jxm5d6emw5rknovg.onion/">https://jxm5d6emw5rknovg.onion/</a> <a href="http://jxm5d6emw5rknovg.onion/">http://jxm5d6emw5rknovg.onion/</a>
</div> </div>
</section> </section>