diff --git a/strings.go b/strings.go index e8cf2b5..0ea151b 100644 --- a/strings.go +++ b/strings.go @@ -173,5 +173,5 @@ const CURRENT_SONG_PLAYLIST_HTML = ` // URL of the server for connecting via a web address const WEB_ADDRESS = ` - Control mumbledj from a web browser: http://%s:9563/%s -` \ No newline at end of file + Control mumbledj from a web browser: http://%s/%s +` diff --git a/web.go b/web.go index afc760f..3cb5e55 100644 --- a/web.go +++ b/web.go @@ -19,12 +19,12 @@ var external_ip = "" func Webserver() { http.HandleFunc("/", homepage) http.HandleFunc("/add", addSong) - http.ListenAndServe(":9563", nil) + http.ListenAndServe(":80", nil) rand.Seed(time.Now().UnixNano()) } func homepage(w http.ResponseWriter, r *http.Request) { - var uname = token_client[r.FormValue("token")] + var uname = token_client[r.URL.Path[1:]] if uname == nil { fmt.Fprintf(w, "Invalid Token") } else {