aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/site/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/site/fs.go')
-rw-r--r--pkg/site/fs.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/site/fs.go b/pkg/site/fs.go
index c9bbe21..b4a941d 100644
--- a/pkg/site/fs.go
+++ b/pkg/site/fs.go
@@ -21,6 +21,11 @@ func NewSiteFileServer(root http.FileSystem, siteConfig *config.SiteConfig) *Sit
}
func (fs *SiteFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ if fs.siteConfig.Flags&config.FlagDisable != 0 {
+ html.ForbiddenDisabledPage(fs.siteConfig.Host).Render(w)
+ return
+ }
+
path := filepath.Clean(r.URL.Path)
file, err := fs.root.Open(path)