Skip to content

Commit

Permalink
Add path labels for ndt5 and ndt7 resources (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz authored Oct 21, 2020
1 parent 8da06dc commit 91f8780
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ndt-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func main() {
ndt5WsMux := http.NewServeMux()
ndt5WsMux.Handle("/", http.FileServer(http.Dir(*htmlDir)))
ndt5WsMux.Handle("/ndt_protocol", ndt5handler.NewWS(*dataDir+"/ndt5"))
controller.AllowPathLabel("/ndt_protocol")
ndt5WsServer := httpServer(
*ndt5WsAddr,
// NOTE: do not use `ac.Then()` to prevent 'double jeopardy' for
Expand All @@ -164,6 +165,8 @@ func main() {
}
ndt7Mux.Handle(spec.DownloadURLPath, http.HandlerFunc(ndt7Handler.Download))
ndt7Mux.Handle(spec.UploadURLPath, http.HandlerFunc(ndt7Handler.Upload))
controller.AllowPathLabel(spec.DownloadURLPath)
controller.AllowPathLabel(spec.UploadURLPath)
ndt7ServerCleartext := httpServer(
*ndt7AddrCleartext,
ac7.Then(logging.MakeAccessLogHandler(ndt7Mux)),
Expand Down

0 comments on commit 91f8780

Please sign in to comment.