ISSUE-296 add CORS
This commit is contained in:
@ -207,6 +207,11 @@ var globalFlags = []cli.Flag{
|
||||
Usage: "comma separated list of ips not allowed to connect to the service",
|
||||
Value: "",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "cors-domains",
|
||||
Usage: "comma separated list of domains allowed for CORS requests",
|
||||
Value: "",
|
||||
},
|
||||
}
|
||||
|
||||
type Cmd struct {
|
||||
@ -245,6 +250,10 @@ func New() *Cmd {
|
||||
options = append(options, server.Listener(v))
|
||||
}
|
||||
|
||||
if v := c.String("cors-domains"); v != "" {
|
||||
options = append(options, server.CorsDomains(v))
|
||||
}
|
||||
|
||||
if v := c.String("tls-listener"); v == "" {
|
||||
} else if c.Bool("tls-listener-only") {
|
||||
options = append(options, server.TLSListener(v, true))
|
||||
|
Reference in New Issue
Block a user