aboutsummaryrefslogtreecommitdiff
path: root/routes/handler.go
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2022-12-17 12:45:21 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2022-12-17 12:45:21 +0530
commitd083d5d72e4bf496b8152d14986818a5b63fe301 (patch)
treeae5dbe4a26ca13a66e02f1c67229548913433c27 /routes/handler.go
parentreadme: some bs (diff)
downloadlegitrx-d083d5d72e4bf496b8152d14986818a5b63fe301.tar.gz
legitrx-d083d5d72e4bf496b8152d14986818a5b63fe301.tar.zst
legitrx-d083d5d72e4bf496b8152d14986818a5b63fe301.zip
routes: serve static content from /static
Diffstat (limited to 'routes/handler.go')
-rw-r--r--routes/handler.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/handler.go b/routes/handler.go
index 7d9266b..d230773 100644
--- a/routes/handler.go
+++ b/routes/handler.go
@@ -56,6 +56,7 @@ func Handlers(c *config.Config) *flow.Mux {
})
mux.HandleFunc("/", d.Index, "GET")
+ mux.HandleFunc("/static/:file", d.ServeStatic, "GET")
mux.HandleFunc("/:name", dw.Multiplex, "GET", "POST")
mux.HandleFunc("/:name/tree/:ref/...", d.RepoTree, "GET")
mux.HandleFunc("/:name/blob/:ref/...", d.FileContent, "GET")