https://codereview.appspot.com/6820117/diff/1/muxer.go File muxer.go (right): https://codereview.appspot.com/6820117/diff/1/muxer.go#newcode62 muxer.go:62: SetCORS(origin, credentials, headers string) Add a better description of each arg: origin is either "*" or a host; credentials is either "true" or "false"; headers are comma- or space- separated? Also, describe how to disable CORS, e.g. SetCORS("", "", "") https://codereview.appspot.com/6820117/diff/1/muxer_test.go File muxer_test.go (right): https://codereview.appspot.com/6820117/diff/1/muxer_test.go#newcode105 muxer_test.go:105: func TestCORS(t *testing.T) { Add a test for CORS disabled by default.
https://codereview.appspot.com/6820117/diff/1/muxer.go File muxer.go (right): https://codereview.appspot.com/6820117/diff/1/muxer.go#newcode42 muxer.go:42: CORS_ALLOW_ORIGIN = "Access-Control-Allow-Origin" CorsAllowOrigin https://codereview.appspot.com/6820117/diff/1/muxer.go#newcode95 muxer.go:95: origin string you could consider moving this to a different struct and embedding it. https://codereview.appspot.com/6820117/diff/1/muxer.go#newcode101 muxer.go:101: func (dm *defaultMux) SetCORS(origin, credentials, headers string) { Then you could just construct a struct literal for settings all the field at once.