Discover LAN servers and relay authenticated browser peer connections
This commit is contained in:
@@ -153,6 +153,7 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
}
|
||||
runs.serveArtifact(w, r)
|
||||
})
|
||||
mux.HandleFunc("GET /discovery", serveServerDiscovery)
|
||||
mux.HandleFunc("GET /files", serveHomeFile)
|
||||
mux.HandleFunc("POST /chat-uploads", serveChatUpload)
|
||||
mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -276,6 +277,10 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
if handleDirectoryListing(request, write) {
|
||||
continue
|
||||
}
|
||||
if request.Type == protocol.DiscoverServersRequest {
|
||||
go handleServerDiscovery(connCtx, request, write)
|
||||
continue
|
||||
}
|
||||
if request.Type == protocol.ServerStatsRequest {
|
||||
go handleServerStats(connCtx, request, runs, options.ServerStatsSampler, started, build, write)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user