mirror of
https://github.com/skidoodle/iphistory.git
synced 2026-04-28 15:57:36 +02:00
chore: Update Dockerfile and main.go for serving web content from the 'web' directory
This commit is contained in:
@@ -115,9 +115,7 @@ func trackIP(ipChan <-chan string) {
|
||||
}
|
||||
|
||||
func serveWeb() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "index.html")
|
||||
})
|
||||
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("web"))))
|
||||
|
||||
http.HandleFunc("/history", func(w http.ResponseWriter, r *http.Request) {
|
||||
history, err := readHistory()
|
||||
|
||||
Reference in New Issue
Block a user