summaryrefslogtreecommitdiffstats
path: root/modules/public/public.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/public/public.go')
-rw-r--r--modules/public/public.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/public/public.go b/modules/public/public.go
index f4a769f27a..91ecf42a3c 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -28,7 +28,7 @@ const AssetsURLPathPrefix = "/assets/"
// AssetsHandlerFunc implements the static handler for serving custom or original assets.
func AssetsHandlerFunc(opts *Options) http.HandlerFunc {
- var custPath = filepath.Join(setting.CustomPath, "public")
+ custPath := filepath.Join(setting.CustomPath, "public")
if !filepath.IsAbs(custPath) {
custPath = filepath.Join(setting.AppWorkPath, custPath)
}
@@ -85,7 +85,7 @@ func AssetsHandlerFunc(opts *Options) http.HandlerFunc {
// parseAcceptEncoding parse Accept-Encoding: deflate, gzip;q=1.0, *;q=0.5 as compress methods
func parseAcceptEncoding(val string) map[string]bool {
parts := strings.Split(val, ";")
- var types = make(map[string]bool)
+ types := make(map[string]bool)
for _, v := range strings.Split(parts[0], ",") {
types[strings.TrimSpace(v)] = true
}