aboutsummaryrefslogtreecommitdiffstats
path: root/modules/public/serve_dynamic.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/public/serve_dynamic.go')
-rw-r--r--modules/public/serve_dynamic.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/modules/public/serve_dynamic.go b/modules/public/serve_dynamic.go
index cd74ee5743..a668b17c34 100644
--- a/modules/public/serve_dynamic.go
+++ b/modules/public/serve_dynamic.go
@@ -6,17 +6,10 @@
package public
import (
- "io"
- "net/http"
- "os"
- "time"
+ "code.gitea.io/gitea/modules/assetfs"
+ "code.gitea.io/gitea/modules/setting"
)
-func fileSystem(dir string) http.FileSystem {
- return http.Dir(dir)
-}
-
-// serveContent serve http content
-func serveContent(w http.ResponseWriter, req *http.Request, fi os.FileInfo, modtime time.Time, content io.ReadSeeker) {
- http.ServeContent(w, req, fi.Name(), modtime, content)
+func BuiltinAssets() *assetfs.Layer {
+ return assetfs.Local("builtin(static)", setting.StaticRootPath, "public")
}