Plugin assets, external scripts and CSP overrides (#4260)

* Add assets for plugins
* Move plugin javascript and css into separate endpoints
* Allow loading external scripts
* Add csp overrides
* Only include enabled plugins
* Move URLMap to utils
* Use URLMap for assets
* Add documentation
This commit is contained in:
WithoutPants
2023-11-19 10:41:16 +11:00
committed by GitHub
parent 4dd4c3c658
commit 222475df82
20 changed files with 621 additions and 105 deletions

View File

@@ -50,7 +50,9 @@ func serveLoginPage(loginUIBox fs.FS, w http.ResponseWriter, r *http.Request, re
}
w.Header().Set("Content-Type", "text/html")
setPageSecurityHeaders(w, r)
// we shouldn't need to set plugin exceptions here
setPageSecurityHeaders(w, r, nil)
utils.ServeStaticContent(w, r, buffer.Bytes())
}