diff --git a/image.go b/image.go index eeb2b9f..ef690c6 100644 --- a/image.go +++ b/image.go @@ -11,7 +11,7 @@ func generate(w http.ResponseWriter, r *http.Request) { code := r.URL.Path[1+len("image/"):] if code == "" { - fmt.Fprintf(w, "call /image/") + fmt.Fprintf(w, "call /njump/image/") return } diff --git a/main.go b/main.go index 401bcb9..3d01f3a 100644 --- a/main.go +++ b/main.go @@ -11,9 +11,9 @@ var log = zerolog.New(os.Stderr).Output(zerolog.ConsoleWriter{Out: os.Stdout}). With().Timestamp().Logger() func main() { - http.HandleFunc("/image/", generate) - http.HandleFunc("/proxy/", proxy) - http.Handle("/static/", http.FileServer(http.FS(static))) + http.HandleFunc("/njump/image/", generate) + http.HandleFunc("/njump/proxy/", proxy) + http.Handle("/njump/static/", http.StripPrefix("/njump/", http.FileServer(http.FS(static)))) http.HandleFunc("/", render) port := os.Getenv("PORT") diff --git a/render.go b/render.go index bc0fcf2..372b94f 100644 --- a/render.go +++ b/render.go @@ -149,7 +149,7 @@ func render(w http.ResponseWriter, r *http.Request) { textImageURL := "" description := "" if useTextImage { - textImageURL = fmt.Sprintf("https://%s/image/%s", hostname, code) + textImageURL = fmt.Sprintf("https://%s/njump/image/%s", hostname, code) if subject != "" { description = fmt.Sprintf("%s -- %s", subject, seenOnRelays) } else { @@ -181,7 +181,7 @@ func render(w http.ResponseWriter, r *http.Request) { "videoType": videoType, "image": image, "video": video, - "proxy": "https://" + hostname + "/proxy?src=", + "proxy": "https://" + hostname + "/njump/proxy?src=", "eventJSON": string(eventJSON), } diff --git a/templates/head.html b/templates/head.html index e8172b4..7f3469b 100644 --- a/templates/head.html +++ b/templates/head.html @@ -45,7 +45,6 @@ {{end}} - - - - \ No newline at end of file + + +