Skip to content
Browse files

CORS: Specify AllowCredentials, so the client sends the session cookie.

See also the similar change on the client side:
  • Loading branch information
murraycu committed Sep 6, 2017
1 parent dc2e4b5 commit ae9ef56b2d782d32a3c956bfc61615992b1c882b
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/bigoquiz/bigoquiz.go
@@ -38,7 +38,9 @@ func init() {
c := cors.New(cors.Options{
AllowedOrigins: []string{""},
AllowedMethods: []string{"GET", "POST", "OPTIONS"},
AllowCredentials: true, // Note: The client needs to specify this too, or cookies won't be sent.

handler := c.Handler(router)
http.Handle("/", handler)

0 comments on commit ae9ef56

Please sign in to comment.
You can’t perform that action at this time.