implement a flag to specify custom crossdomain.xml (#19262)

fixes #16909
This commit is contained in:
Harshavardhana
2024-03-17 23:42:40 -07:00
committed by GitHub
parent a0de56abb6
commit f168ef9989
4 changed files with 22 additions and 3 deletions

View File

@@ -361,6 +361,14 @@ func buildServerCtxt(ctx *cli.Context, ctxt *serverCtxt) (err error) {
ctxt.ConsoleAddr = ctx.String("console-address")
}
if cxml := ctx.String("crossdomain-xml"); cxml != "" {
buf, err := os.ReadFile(cxml)
if err != nil {
return err
}
ctxt.CrossDomainXML = string(buf)
}
// Check "no-compat" flag from command line argument.
ctxt.StrictS3Compat = !(ctx.IsSet("no-compat") || ctx.GlobalIsSet("no-compat"))