-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
I'm not sure how plausible this is but it would be nice for CORS to work without assuming a TrieServeMux. From IRC:
[11:41:46] <submersive> rcrowley: looking at tigertonic cors stuff, confused as to how this works with options well?
[11:43:36] <submersive> it doesn't look like it knows the allowed methods or accepts/provides content types?
[11:43:43] <rcrowley> submersive: mihasya actually wrote the CORS support so hopefully he's around. As far as I remember, OPTIONS is handled correctly by tigertonic.TrieServeMux with some added headers for CORS.
[11:44:00] <submersive> ah with Trie Mux
[11:44:22] <submersive> been using gorilla mux since we match on uuid's
[11:44:35] <submersive> I'll take a closer look, thanks
[11:45:00] <rcrowley> Ah, that explains it.
[11:45:33] <rcrowley> submersive: I'd like to decouple those components; they really don't have anything to do with each other except for the collision on header names.
[11:46:21] <submersive> rcrowley: yeah, really need something to build out that metadata somehow
[11:46:42] <submersive> like I guess java has that jax-rs, erlang has the webmachine/cowboy_rest thing
[11:47:27] <submersive> nothing really like that for go except I guess go-restful, but its all tied in with go-restful so harder to mix'n'match like with tigertonic and gorilla (I like tigertonic and gorilla)
[11:48:33] <submersive> I guess a fancier mux could do that
[11:51:59] <rcrowley> submersive: the key's really http.ResponseWriter.Header() and some agreement about how to cooperatively add/modify headers. I think for CORS it's solvable. I'll ping mihasya, who doesn't appear to be online right now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels