Skip to content

Commit

Permalink
Add rack-cors middleware to readme for Cross Origin Resource Sharing …
Browse files Browse the repository at this point in the history
…explanations
  • Loading branch information
gottfrois committed Aug 16, 2012
1 parent 51c0977 commit d247139
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ All supported ruby versions are [listed here](https://github.com/applicake/doork

## Additional information

### Cross Origin Resource Sharing

You might want to use Doorkeeper to protect an API and want an other application running in a different context (like a mobile application) to request on your API.

For mobile application, you might have to setup Cross Origin Resource Sharing. More info [here](http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/)

In order to setup the bahavior, you can take a look at [rack-cors](https://github.com/cyu/rack-cors). It's a rack middleware that will set http headers for you in order to be able to make cross domain requests to your doorkeeper protected application (usualy your API).

[Here](https://github.com/gottfrois/doorkeeper-provider-app) is a demo application where rack-cors has been setup.

### Maintainers

- Felipe Elias Philipp ([github.com/felipeelias](https://github.com/felipeelias), [twitter.com/felipeelias](https://twitter.com/felipeelias))
Expand Down

0 comments on commit d247139

Please sign in to comment.