forked from solderpunk/molly-brown
Fix silly mistake in hasty port checking fix.
This commit is contained in:
parent
4c27911e8f
commit
44af303de6
|
@ -15,6 +15,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -60,7 +61,7 @@ func handleGeminiRequest(conn net.Conn, config Config, accessLogEntries chan Log
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reject requests for content from other servers
|
// Reject requests for content from other servers
|
||||||
if URL.Hostname() != config.Hostname || (URL.Port() != "" && URL.Port() != config.Port) {
|
if URL.Hostname() != config.Hostname || (URL.Port() != "" && URL.Port() != strconv.Itoa(config.Port)) {
|
||||||
conn.Write([]byte("53 No proxying to other hosts or ports!\r\n"))
|
conn.Write([]byte("53 No proxying to other hosts or ports!\r\n"))
|
||||||
log.Status = 53
|
log.Status = 53
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue