MobilityData / gbfs

Documentation for the General Bikeshare Feed Specification, a standardized data feed for shared mobility system availability. Maintained by MobilityData
https://gbfs.org
Other
784 stars 287 forks source link

Question: Encourage CORS settings for easier use? #26

Closed trevorgerhardt closed 8 years ago

trevorgerhardt commented 8 years ago

Last week I threw together this: https://github.com/trevorgerhardt/gbfs-map to explore the participating GBFS networks. Initially, I wanted to just pull in the data on page load in the front end, first querying the systems.csv file in this repo and then pulling in the gbfs.json file for a system when it was needed. A problem that quickly arose is that certain CORS settings disallow direct requests from a browser. To see an example I queried the Cabi gbfs.json from the Chrome console and it worked, but the Monash system failed.

screenshot 2016-05-11 08 39 33

If each system added to their OPTIONS header: Access-Control-Allow-Origin: *, we wouldn't need to proxy through an additional system.

Learn more about CORS here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

cubbi commented 8 years ago

Hey @trevorgerhardt,

Please check again and let me know if it works for you. Thanks!

trevorgerhardt commented 8 years ago

@cubbi awesome! Do you have the ability to update all of the systems? Didn't realize there was central control.

cubbi commented 8 years ago

@trevorgerhardt we deployed that change across all SocialBicycles systems - you mentioned monash, and it's running on our equipment, so we have been able to fix that.

trevorgerhardt commented 8 years ago

Nice. So the only that fails now is BCycle's Heartland: https://gbfs.bcycle.com/bcycle_heartland/gbfs.json

jcn commented 8 years ago

Anyone from BCycle around who can make this change?

cc @jasongdove @mplsmitch

jasongdove commented 8 years ago

All BCycle systems have been updated.

jcn commented 8 years ago

:+1: