mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-24 06:14:04 +08:00
🎇 add public folder router
This commit is contained in:
parent
36f07ee194
commit
958d793725
@ -32,7 +32,12 @@ func Static(r *gin.Engine) {
|
||||
if err != nil {
|
||||
log.Fatalf("can't find assets folder")
|
||||
}
|
||||
pub, err := fs.Sub(public.Public, "public")
|
||||
if err != nil {
|
||||
log.Fatalf("can't find public folder")
|
||||
}
|
||||
r.StaticFS("/assets/", http.FS(assets))
|
||||
r.StaticFS("/public/", http.FS(pub))
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
c.Status(200)
|
||||
c.Header("Content-Type", "text/html")
|
||||
|
Loading…
x
Reference in New Issue
Block a user