aboutsummaryrefslogtreecommitdiffstats
path: root/modules/public/public.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/public/public.go')
-rw-r--r--modules/public/public.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/public/public.go b/modules/public/public.go
index fb8d9c1955..8d027855c2 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -30,12 +30,13 @@ type Options struct {
Prefix string
}
-// List of known entries inside the `public` directory
-var knownEntries = []string{
+// KnownPublicEntries list all direct children in the `public` directory
+var KnownPublicEntries = []string{
"css",
"fomantic",
"img",
"js",
+ "serviceworker.js",
"vendor",
}
@@ -114,7 +115,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options)
if len(parts) < 2 {
return false
}
- for _, entry := range knownEntries {
+ for _, entry := range KnownPublicEntries {
if entry == parts[1] {
ctx.Resp.WriteHeader(404)
return true