diff --git a/server/server.go b/server/server.go index 46b23771..17d72af3 100644 --- a/server/server.go +++ b/server/server.go @@ -111,8 +111,10 @@ type WebConfig struct { // Dir string - // A file system includes web static. Will be overwritten by Dir - // It is expected to contain the directories as Dir. + // Alternative way to configure web static filesystem. Dir overrides this. + // It's expected to contain the same files and directories as mentioned + // above in Dir doc. + // WebFS fs.FS // Defaults to "( issuer URL )/theme/logo.png" diff --git a/server/templates.go b/server/templates.go index 0d191644..ca5e4d24 100644 --- a/server/templates.go +++ b/server/templates.go @@ -79,6 +79,8 @@ func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error) } if c.dir != "" { c.webFS = os.DirFS(c.dir) + } else if c.webFS == nil { + c.webFS = os.DirFS("./web") } if c.logoURL == "" { c.logoURL = "theme/logo.png"