mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Fix middleware for favicon/sitemap
This commit is contained in:
parent
4c031fe7e4
commit
e0e3f0c141
2 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
{{content-for 'head'}}
|
{{content-for 'head'}}
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta http-equiv=content-security-policy content="default-src *; img-src * 'self' data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *;">
|
||||||
<title>Documize</title>
|
<title>Documize</title>
|
||||||
<meta property="dbname" content="{{.DBname}}" />
|
<meta property="dbname" content="{{.DBname}}" />
|
||||||
<meta property="dbhash" content="{{.DBhash}}" />
|
<meta property="dbhash" content="{{.DBhash}}" />
|
||||||
|
|
|
@ -253,6 +253,7 @@ func (m *middleware) preAuthorizeStaticAssets(rt *env.Runtime, r *http.Request)
|
||||||
strings.ToLower(r.URL.Path) == "/validate" ||
|
strings.ToLower(r.URL.Path) == "/validate" ||
|
||||||
strings.ToLower(r.URL.Path) == "/favicon.ico" ||
|
strings.ToLower(r.URL.Path) == "/favicon.ico" ||
|
||||||
strings.ToLower(r.URL.Path) == "/robots.txt" ||
|
strings.ToLower(r.URL.Path) == "/robots.txt" ||
|
||||||
|
strings.ToLower(r.URL.Path) == "/sitemap.xml" ||
|
||||||
strings.ToLower(r.URL.Path) == "/version" ||
|
strings.ToLower(r.URL.Path) == "/version" ||
|
||||||
strings.HasPrefix(strings.ToLower(r.URL.Path), "/api/public/") ||
|
strings.HasPrefix(strings.ToLower(r.URL.Path), "/api/public/") ||
|
||||||
((rt.Flags.SiteMode == env.SiteModeSetup) && (strings.ToLower(r.URL.Path) == "/api/setup")) {
|
((rt.Flags.SiteMode == env.SiteModeSetup) && (strings.ToLower(r.URL.Path) == "/api/setup")) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue