Skip to content

Commit

Permalink
Update README.md for ease of use (rs#53)
Browse files Browse the repository at this point in the history
Added Debug to one of the examples, explained why with a comment.
I know the information is there but I don't think it is well highlighted. I was wondering why my requests were coming back without Access-Control-Allow-Origin (but not erroring visibly) so perhaps this will help others not make the same errors.
  • Loading branch information
co60ca authored and rs committed Apr 17, 2018
1 parent ff3499d commit 12972ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ Parameters are passed to the middleware thru the `cors.New` method as follow:

```go
c := cors.New(cors.Options{
AllowedOrigins: []string{"http://foo.com"},
AllowedOrigins: []string{"http://foo.com", "http://foo.com:8080"},
AllowCredentials: true,
// Enable Debugging for testing, consider disabling in production
Debug: true,
})

// Insert the middleware
Expand Down

0 comments on commit 12972ae

Please sign in to comment.