Update main.go
This commit is contained in:
5
main.go
5
main.go
@@ -39,7 +39,10 @@ func main() {
|
||||
},
|
||||
CheckOrigin: func(r *http.Request) bool { return true }, // Разрешить все Origin для теста
|
||||
}
|
||||
|
||||
// Раздаем index.html
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "index.html")
|
||||
})
|
||||
http.HandleFunc("/wt", func(w http.ResponseWriter, r *http.Request) {
|
||||
log.Println("New WebTransport request from:", r.RemoteAddr)
|
||||
sess, err := server.Upgrade(w, r)
|
||||
|
||||
Reference in New Issue
Block a user