set RefNoRef to true when using an external domain for StaticResBase
This commit is contained in:
parent
f502bf4f53
commit
4680aef783
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user