Skip to content

Commit 1855ceb

Browse files
schoentoonToon Schoenmakers
and
Toon Schoenmakers
authored
Only display landing page on / (#261)
Signed-off-by: Toon Schoenmakers <[email protected]> Co-authored-by: Toon Schoenmakers <[email protected]>
1 parent ad41e17 commit 1855ceb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/landing_page.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ func NewLandingPage(c LandingConfig) (*LandingPageHandler, error) {
106106
}
107107

108108
func (h *LandingPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
109+
if r.URL.Path != "/" {
110+
http.NotFound(w, r)
111+
return
112+
}
109113
w.Header().Add("Content-Type", "text/html; charset=UTF-8")
110114
w.Write(h.landingPage)
111115
}

0 commit comments

Comments
 (0)