Skip to content

CORS & /api/editions/current#21

Merged
remi merged 2 commits intoopencodeca:masterfrom
jbourassa:feature/shuffler-api
Nov 27, 2013
Merged

CORS & /api/editions/current#21
remi merged 2 commits intoopencodeca:masterfrom
jbourassa:feature/shuffler-api

Conversation

@jbourassa
Copy link
Member

Ça va faciliter le travail de faire revivre le opencode-shuffler de @gregsadetsky.

Jimmy Bourassa added 2 commits November 26, 2013 22:57
Always point to the last known OpenCode edition.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

À quoi ça sert ça au juste?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From MDN:

Additionally, for HTTP request methods that can cause side-effects on user data (in particular, for HTTP methods other than GET, or for POST usage with certain MIME types), the specification mandates that browsers "preflight" the request, soliciting supported methods from the server with an HTTP OPTIONS request method, and then, upon "approval" from the server, sending the actual request with the actual HTTP request method. Servers can also notify clients whether "credentials" (including Cookies and HTTP Authentication data) should be sent with requests.

Peut-être pas nécessaire ici maintenant que je lis ça parce qu'on permet uniquement le GET, mais je trouve ça quand même logique de le laisser pour dire "CORS : GET only" plutôt que de faire un 404 quand un CORS call est fait avec autre chose que GET.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK donc c’est juste pour répondre un 200 lors d’une requête HTTP OPTIONS, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Petite précision: 200 avec les headers specifiés dans le before.

@gregsadetsky
Copy link

Err, thanks guys. On pourrait en profiter pour en faire une nouvelle version? Une pas-affaire de casino? Idées?

@jbourassa
Copy link
Member Author

^ Je pensais plutôt ajouté des sons de coins qui tombent!

remi added a commit that referenced this pull request Nov 27, 2013
@remi remi merged commit 9173737 into opencodeca:master Nov 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants