Fixing build issues
This commit is contained in:
parent
a0f8ee59a1
commit
5d68fc57b7
|
@ -173,5 +173,5 @@ const CURRENT_SONG_PLAYLIST_HTML = `
|
||||||
|
|
||||||
// URL of the server for connecting via a web address
|
// URL of the server for connecting via a web address
|
||||||
const WEB_ADDRESS = `
|
const WEB_ADDRESS = `
|
||||||
Control mumbledj from a web browser: <a href="http://%s:9563/%s">http://%s:9563/%s</a>
|
Control mumbledj from a web browser: <a href="http://%s/%s">http://%s/%s</a>
|
||||||
`
|
`
|
4
web.go
4
web.go
|
@ -19,12 +19,12 @@ var external_ip = ""
|
||||||
func Webserver() {
|
func Webserver() {
|
||||||
http.HandleFunc("/", homepage)
|
http.HandleFunc("/", homepage)
|
||||||
http.HandleFunc("/add", addSong)
|
http.HandleFunc("/add", addSong)
|
||||||
http.ListenAndServe(":9563", nil)
|
http.ListenAndServe(":80", nil)
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
}
|
}
|
||||||
|
|
||||||
func homepage(w http.ResponseWriter, r *http.Request) {
|
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 {
|
if uname == nil {
|
||||||
fmt.Fprintf(w, "Invalid Token")
|
fmt.Fprintf(w, "Invalid Token")
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue