mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
move redirectors, renderRelay and renderProfile out of render.
This commit is contained in:
@@ -11,8 +11,14 @@ import (
|
||||
)
|
||||
|
||||
func renderRelayPage(w http.ResponseWriter, r *http.Request) {
|
||||
code := r.URL.Path[1:]
|
||||
hostname := code[2:]
|
||||
hostname := r.URL.Path[3:]
|
||||
|
||||
if strings.HasPrefix(hostname, "wss:/") || strings.HasPrefix(hostname, "ws:/") {
|
||||
hostname = trimProtocol(hostname)
|
||||
http.Redirect(w, r, "/r/"+hostname, http.StatusFound)
|
||||
return
|
||||
}
|
||||
|
||||
isSitemap := false
|
||||
numResults := 1000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user