marionleborgne/cloudbrain

Enable Cross Origin Requests in Python API

Closed this issue · 3 comments

We can enable cross-origin requests in the initial phase in the API adding the CORS headers in the response:

Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE,PUT
Access-Control-Allow-Origin:*

In this way, we can write the fronted and javascript API in a clean way from the beginning (without using JSONP or other tricks). Afterwords, we can deal with AAA aspects and determine how the API will be accessed (e.g., OAuth, etc.)

@flysonic10 Not sure if this is still the way to go for cross-origin requests? or will the new oauth server take care of this issue? I'll have to update the API server anyway...

We'll still need CORS support. I believe @lambdaloop and I had added CORS support to the API awhile ago.

Correct. I just checked. Closing this as implemented. Thanks.