rcrowley / go-tigertonic

A Go framework for building JSON web services inspired by Dropwizard
Other
997 stars 79 forks source link

Add Access-Control-Allow-Credentials #78

Closed RossJHagan closed 10 years ago

RossJHagan commented 10 years ago

Hopefully completes the TODO. Apologies if there's something I've missed in the spec, but it seems to have boiled down to the conditions:

  1. Only set if there is there a valid request origin, that matches a specific allowed origin (never set for Origin *)
  2. Only set the credentials header with the value 'true', otherwise just don't set the header.