OFFLINE-GmbH / oc-cors-plugin

Setup and manage Cross-Origin Resource Sharing headers in October CMS
MIT License
12 stars 6 forks source link

Response status code 200 #12

Closed dzapek closed 10 months ago

dzapek commented 11 months ago

At the client's request, I add status code 200. From the information provided, the status may be 200 and 204

tobias-kuendig commented 11 months ago

@dzapek thank you for this PR. May I ask what your use-case is for the 200 status response?

We follow MDN's guidelines for preflight requests and return 204.

https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request

dzapek commented 10 months ago

Hi @tobias-kuendig , Thanks for your patience. According to this https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS the allowed code status for options is 200 and 204. Our client needs status code 200 and we have no influence on this

tobias-kuendig commented 10 months ago

Thanks, this has been published as v1.1.1. Please note that the settings name was changed to preflightResponseStatusCode.