Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake
Commits
8dcd337c
Commit
8dcd337c
authored
Aug 11, 2017
by
David Fifield
Browse files
Re-remove ipHandler function.
Had been removed in
2a46db2c
and was erroneously restored in the merge
36debdfd
.
parent
36debdfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
broker/broker.go
View file @
8dcd337c
...
...
@@ -12,7 +12,6 @@ import (
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"strings"
"time"
...
...
@@ -222,15 +221,6 @@ func robotsTxtHandler(w http.ResponseWriter, r *http.Request) {
w
.
Write
([]
byte
(
"User-agent: *
\n
Disallow:
\n
"
))
}
func
ipHandler
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
remoteAddr
:=
r
.
RemoteAddr
if
net
.
ParseIP
(
remoteAddr
)
.
To4
()
==
nil
{
remoteAddr
=
"["
+
remoteAddr
+
"]"
}
w
.
Header
()
.
Set
(
"Content-Type"
,
"text/plain; charset=utf-8"
)
w
.
Write
([]
byte
(
remoteAddr
))
}
func
main
()
{
var
acmeEmail
string
var
acmeHostnamesCommas
string
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment