Переглянути джерело

removed enforcing of https for .onion

tags/v1.0.0
Remco 9 роки тому
джерело
коміт
0ec05a1888
3 змінених файлів з 2 додано та 7 видалено
  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 Переглянути файл

@@ -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 Переглянути файл

@@ -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 Переглянути файл

@@ -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>



Завантаження…
Відмінити
Зберегти