mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-12 13:07:50 +00:00
Support multiple canonical-domain-files
This commit is contained in:
parent
2410137438
commit
b2d40c5154
13 changed files with 238 additions and 128 deletions
|
@ -20,9 +20,6 @@ func NewDefaultConfig() Config {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
// defaults does not support setting arrays from strings
|
||||
config.Server.PagesBranches = []string{"main", "master", "pages"}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
|
@ -76,7 +73,7 @@ func mergeServerConfig(ctx *cli.Context, config *ServerConfig) {
|
|||
config.RawDomain = ctx.String("raw-domain")
|
||||
}
|
||||
if ctx.IsSet("canonical-domain-file") {
|
||||
config.CanonicalDomainFile = ctx.String("canonical-domain-file")
|
||||
config.CanonicalDomainFiles = ctx.StringSlice("canonical-domain-file")
|
||||
}
|
||||
if ctx.IsSet("pages-branch") {
|
||||
config.PagesBranches = ctx.StringSlice("pages-branch")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue