Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

HTTP CORS headers #176

Open
tsenart opened this issue Jun 20, 2015 · 6 comments
Open

HTTP CORS headers #176

tsenart opened this issue Jun 20, 2015 · 6 comments

Comments

@tsenart
Copy link
Contributor

tsenart commented Jun 20, 2015

In order to enable web-browsers to use the Mesos DNS HTTP API, we have to set appropriate CORS headers. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Thanks @mhausenblas for reporting.

@jdef
Copy link
Contributor

jdef commented Jun 20, 2015

What's the use case for this? A javascript-backed, mesos-dns driven discovery console/UI?

@mhausenblas
Copy link

Indeed @jdef if you want to do service discovery directly from a web app/client-side, like I showed at XebiCon and you can see me struggle at it around minute 6:40 here … workaround in this version of the app was to have a Chrome plug-in that handles CORS. In the current version of the demo app I built a simple proxy that also takes care of CORS.

@tsenart
Copy link
Contributor Author

tsenart commented Jun 23, 2015

I used this successfully in the past: https://github.com/streadway/handy/blob/master/cors/cors.go

Unfortunately, the HTTP library we're currently using violates the sacrosanct http.Handler interface :-(

@sttts sttts added the newbie label Aug 20, 2015
@rsiebeling
Copy link

Hi, is this solved? I need to query mesos-DNS from my frontend to discover the backend server and this isn't possible due to the CORS issue...

@jdef
Copy link
Contributor

jdef commented Feb 8, 2017

I don't think anyone has solved this yet. The HTTP lib that we're using seems to implement support for CORS. If anyone wanted to make an initial contribution to the project, this would be a good fit.

@rsiebeling
Copy link

Maybe I could help, but will need some assistance, never did a pull request, I have no experience in Go and do not have that much time. Maybe I'm not the best person to take this up...
However if nobody take this up and someone could help me get started I'd be happy to do this, looking at the comment from tsenart it shouldn't be too hard

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants