Add cors header flag and leave boolean flag not changed

Deprecate api-enable-cors

Update docs & man files

Signed-off-by: harry zhang <resouer@163.com>
This commit is contained in:
resouer
2015-03-03 11:21:19 +08:00
parent 8e107a9321
commit f3dd2db4ff
7 changed files with 30 additions and 15 deletions
+3 -1
View File
@@ -39,6 +39,7 @@ type Config struct {
Mtu int
SocketGroup string
EnableCors bool
CorsHeaders string
DisableNetwork bool
EnableSelinuxSupport bool
Context map[string][]string
@@ -68,7 +69,8 @@ func (config *Config) InstallFlags() {
flag.BoolVar(&config.EnableSelinuxSupport, []string{"-selinux-enabled"}, false, "Enable selinux support")
flag.IntVar(&config.Mtu, []string{"#mtu", "-mtu"}, 0, "Set the containers network MTU")
flag.StringVar(&config.SocketGroup, []string{"G", "-group"}, "docker", "Group for the unix socket")
flag.BoolVar(&config.EnableCors, []string{"#api-enable-cors", "-api-enable-cors"}, false, "Enable CORS headers in the remote API")
flag.BoolVar(&config.EnableCors, []string{"#api-enable-cors", "#-api-enable-cors"}, false, "Enable CORS headers in the remote API")
flag.StringVar(&config.CorsHeaders, []string{"-api-cors-header"}, "", "Set CORS headers in the remote API")
opts.IPVar(&config.DefaultIp, []string{"#ip", "-ip"}, "0.0.0.0", "Default IP when binding container ports")
opts.ListVar(&config.GraphOptions, []string{"-storage-opt"}, "Set storage driver options")
// FIXME: why the inconsistency between "hosts" and "sockets"?