update: redirect user to not found tunnel page
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m49s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m49s
This commit is contained in:
@ -156,7 +156,7 @@ func Handler(conn net.Conn) {
|
|||||||
sshSession, ok := session.Clients[slug]
|
sshSession, ok := session.Clients[slug]
|
||||||
if !ok {
|
if !ok {
|
||||||
conn.Write([]byte("HTTP/1.1 301 Moved Permanently\r\n" +
|
conn.Write([]byte("HTTP/1.1 301 Moved Permanently\r\n" +
|
||||||
fmt.Sprintf("Location: https://%s/tunnel-not-found?slug=%s\r\n", utils.Getenv("domain"), slug) +
|
fmt.Sprintf("Location: https://tunnl.live/tunnel-not-found?slug=%s\r\n", slug) +
|
||||||
"Content-Length: 0\r\n" +
|
"Content-Length: 0\r\n" +
|
||||||
"Connection: close\r\n" +
|
"Connection: close\r\n" +
|
||||||
"\r\n"))
|
"\r\n"))
|
||||||
|
|||||||
@ -103,7 +103,7 @@ func HandlerTLS(conn net.Conn) {
|
|||||||
sshSession, ok := session.Clients[slug]
|
sshSession, ok := session.Clients[slug]
|
||||||
if !ok {
|
if !ok {
|
||||||
conn.Write([]byte("HTTP/1.1 301 Moved Permanently\r\n" +
|
conn.Write([]byte("HTTP/1.1 301 Moved Permanently\r\n" +
|
||||||
fmt.Sprintf("Location: https://%s/tunnel-not-found?slug=%s\r\n", utils.Getenv("domain"), slug) +
|
fmt.Sprintf("Location: https://tunnl.live/tunnel-not-found?slug=%s\r\n", slug) +
|
||||||
"Content-Length: 0\r\n" +
|
"Content-Length: 0\r\n" +
|
||||||
"Connection: close\r\n" +
|
"Connection: close\r\n" +
|
||||||
"\r\n"))
|
"\r\n"))
|
||||||
|
|||||||
Reference in New Issue
Block a user