CORS & /api/editions/current#21
CORS & /api/editions/current#21remi merged 2 commits intoopencodeca:masterfrom jbourassa:feature/shuffler-api
Conversation
Always point to the last known OpenCode edition.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
OK donc c’est juste pour répondre un 200 lors d’une requête HTTP OPTIONS, right?
There was a problem hiding this comment.
Right. Petite précision: 200 avec les headers specifiés dans le before.
|
Err, thanks guys. On pourrait en profiter pour en faire une nouvelle version? Une pas-affaire de casino? Idées? |
|
^ Je pensais plutôt ajouté des sons de coins qui tombent! |
Ça va faciliter le travail de faire revivre le opencode-shuffler de @gregsadetsky.