mirror of
https://github.com/aljazceru/haven.git
synced 2026-02-03 04:34:19 +01:00
Merge pull request #16 from bitvora/dev-staticBugFix
remove duplicate static handler declarations
This commit is contained in:
12
main.go
12
main.go
@@ -98,10 +98,6 @@ func makeNewRelay(relayType string) *khatru.Relay {
|
||||
})
|
||||
|
||||
mux := privateRelay.Router()
|
||||
static := http.FileServer(http.Dir("templates/static"))
|
||||
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", static))
|
||||
mux.Handle("GET /favicon.ico", http.StripPrefix("/", static))
|
||||
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
tmpl := template.Must(template.ParseFiles("templates/index.html"))
|
||||
@@ -177,10 +173,6 @@ func makeNewRelay(relayType string) *khatru.Relay {
|
||||
})
|
||||
|
||||
mux := chatRelay.Router()
|
||||
static := http.FileServer(http.Dir("templates/static"))
|
||||
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", static))
|
||||
mux.Handle("GET /favicon.ico", http.StripPrefix("/", static))
|
||||
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
tmpl := template.Must(template.ParseFiles("templates/index.html"))
|
||||
@@ -222,10 +214,6 @@ func makeNewRelay(relayType string) *khatru.Relay {
|
||||
})
|
||||
|
||||
mux := inboxRelay.Router()
|
||||
static := http.FileServer(http.Dir("templates/static"))
|
||||
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", static))
|
||||
mux.Handle("GET /favicon.ico", http.StripPrefix("/", static))
|
||||
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
tmpl := template.Must(template.ParseFiles("templates/index.html"))
|
||||
|
||||
Reference in New Issue
Block a user