Skip to content

[CORS] Cross Origin Resource Sharing

Daniel Carral edited this page Mar 31, 2017 · 3 revisions

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

For mobile applications, you might have to setup Cross Origin Resource Sharing. More info here

In order to setup the behavior, you can take a look at 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 (usually your API).

Here is a demo application where rack-cors has been setup.

Clone this wiki locally