make using CORS configurable by environment var, defaults to false
This commit is contained in:
parent
bc565a4008
commit
9f75bf6a5d
4 changed files with 7 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ type Server struct {
|
|||
// NewServer creates and configures an APIServer serving all application routes.
|
||||
func NewServer() (*Server, error) {
|
||||
log.Println("configuring server...")
|
||||
api, err := New()
|
||||
api, err := New(viper.GetBool("enable_cors"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue