aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorthinkpadmaster <a.scerba02@gmail.com>2023-07-21 21:54:23 -0500
committerAlex Scerba <alex@scerba.org>2024-10-29 13:19:57 -0400
commitfa4169e37b6d913cb3fd3e79ae1f00459399eccb (patch)
tree6112de31f14433078ec41162faa2f6fda45e00f7 /main.go
parent71c13f58320cb52786e72ee240de69a1ffd70b07 (diff)
Redirect URLs ending it / to the URL without a trailing /
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index da578e4..6e9c95b 100644
--- a/main.go
+++ b/main.go
@@ -37,8 +37,11 @@ func main() {
fs := http.FileServer(http.Dir("./static"))
mux.Handle("/static/", http.StripPrefix("/static/", fs))
+ mux.HandleFunc("/projects", app.post)
mux.HandleFunc("/projects/", app.post)
+ mux.HandleFunc("/blog", app.post)
mux.HandleFunc("/blog/", app.post)
+ mux.HandleFunc("/about", app.about)
mux.HandleFunc("/about/", app.about)
mux.HandleFunc("/", app.home)