deanhiller / databus

time series data in cassandra with visualization(NREL's opensource databus project)
Other
53 stars 21 forks source link

Cors or JSONP support #33

Closed skillflip closed 10 years ago

skillflip commented 10 years ago

Hi,

Thanks for creating a great product. We're writing a AngularJS frontend to interact with Databus, but it seems like the API does not support CORS or JSONP to allow HTML5 cross site applications to work.

We really only want to do GET requests to get time series out for plotting and displaying.

It seems like something you can add relatively easily. I found these links: http://empirewindrush.com/tech/2013/12/17/cors-and-play/ http://stackoverflow.com/questions/14430119/play-2-0-1-and-setting-access-control-allow-origin

Thanks, Johann

skillflip commented 10 years ago

Okay, after going through the code in a bit more detail, I just found out databus actually does support JSONP, (in FTranslatorValuesToJson.java). In my initial tests I screwed up passing the callback GET parameter. (doh!)

Thanks!