Browse Source

removed enforcing of https for .onion

tags/v1.0.0
Remco 9 years ago
parent
commit
0ec05a1888
3 changed files with 2 additions and 7 deletions
  1. +0
    -5
      transfersh-server/handlers.go
  2. +1
    -1
      transfersh-server/static/index.html
  3. +1
    -1
      transfersh-web/index.html

+ 0
- 5
transfersh-server/handlers.go 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) == "transfersh.elasticbeanstalk.com" {
} 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" {
if r.Header.Get("X-Forwarded-Proto") != "https" && r.Method == "GET" {
http.Redirect(w, r, "https://transfer.sh"+r.RequestURI, 301)


+ 1
- 1
transfersh-server/static/index.html View File

@@ -385,7 +385,7 @@
<section id="tor">
<div class="wrapper">
<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>
</section>



+ 1
- 1
transfersh-web/index.html View File

@@ -359,7 +359,7 @@ include "includes/head.html"
<section id="tor">
<div class="wrapper">
<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>
</section>



Loading…
Cancel
Save