Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-uno committed Jul 10, 2014
1 parent efe9695 commit e79e4f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ import (
func main() {
n := negroni.Classic()

// CORS for https://*.foo.com origins, allowing:
// - GET and POST methods
// - Origin header
opts := cors.Options{
AllowAllOrigins: true,
AllowOrigins: []string{"https://*.foo.com"},
AllowMethods: []string{"GET", "POST"},
AllowHeaders: []string{"Origin"},
}

n.Use(negroni.HandlerFunc(opts.Allow))
Expand Down

0 comments on commit e79e4f0

Please sign in to comment.