add flag to configure CORS

This flag enables configuration of the CORS allowed origins on the command line.  It enables functionality already present in kubernetes proper.
For Master yes.  Kube is only transient.


> On Oct 7, 2014, at 1:44 PM, David Eads <notifications@github.com> wrote:
> 
> In pkg/cmd/master/master.go:
> 
> > @@ -95,6 +97,8 @@ func NewCommandStartAllInOne(name string) *cobra.Command {
> >  	flag.StringVar(&cfg.ListenAddr, "listenAddr", "127.0.0.1:8080", "The server listen address.")
> >  	flag.StringVar(&cfg.VolumeDir, "volumeDir", "openshift.local.volumes", "The volume storage directory.")
> >  	flag.StringVar(&cfg.EtcdDir, "etcdDir", "openshift.local.etcd", "The etcd data directory.")
> > +	// this matches the flag in kubernetes
> > +	flag.Var(&cfg.corsAllowedOriginList, "cors_allowed_origins", "List of allowed origins for CORS, comma separated.  An allowed origin can be a regular expression to support subdomain matching.  If this list is empty CORS will not be enabled.")
> @smarterclayton The name was chosen specifically to exactly match the kubernetes flag which it mirrors (see kubernetes/cmd/apiserver/apiserver.go). Do you want our version of the same flag to be different?
> 
> —
> Reply to this email directly or view it on GitHub.