cors fix typo, default config value.

This commit is contained in:
Miroslav Šedivý 2021-01-23 20:08:30 +01:00
parent 789d812b3d
commit 47689d5372

View File

@ -37,7 +37,7 @@ func (Server) Init(cmd *cobra.Command) error {
return err return err
} }
cmd.PersistentFlags().StringSlice("cors", []string{"http://icms:3001"}, "list of allowed origins for CORS") cmd.PersistentFlags().StringSlice("cors", []string{"*"}, "list of allowed origins for CORS")
if err := viper.BindPFlag("cors", cmd.PersistentFlags().Lookup("cors")); err != nil { if err := viper.BindPFlag("cors", cmd.PersistentFlags().Lookup("cors")); err != nil {
return err return err
} }