set RefNoRef to true when using an external domain for StaticResBase

This commit is contained in:
Azareal 2020-07-31 15:53:33 +10:00
parent f502bf4f53
commit 4680aef783
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,8 @@ type config struct {
ExtraCSPOrigins string
StaticResBase string // /s/
//DynStaticResBase string
//AvatarResBase string
Noavatar string // ? - Move this into the settings table?
ItemsPerPage int // ? - Move this into the settings table?
@ -242,6 +244,7 @@ func ProcessConfig() (err error) {
host := uurl.Hostname()
if !local(host) {
Config.ExtraCSPOrigins += " " + host
Config.RefNoRef = true // Avoid leaking origin data to the CDN
}
if Config.StaticResBase != "" {
StaticFiles.Prefix = Config.StaticResBase