# Cors Slim Preflight Request Fails

**URL:** <https://discourse.slimframework.com/t/cors-slim-preflight-request-fails/1992>\
**Category:** Questions\
**Created:** [November 9, 2017, 4:33pm UTC](https://discourse.slimframework.com/t/cors-slim-preflight-request-fails/1992 "2017-11-09T16:33:26Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [January 10, 2018, 10:56pm UTC](https://discourse.slimframework.com/t/cors-slim-preflight-request-fails/1992/4 "2018-01-10T22:56:39Z")

</div>

A [preflight](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Preflighted_requests) request (which will be OPTIONS rather than POST) must respond with the permission in the response header.

Your server needs to respond to it with a `200 OK` response and appropriate `Access-Control-Allow-...` origin headers.

More details: [https://stackoverflow.com/a/8689332/1461181](https://stackoverflow.com/a/8689332/1461181)

---

_[View the full topic](https://discourse.slimframework.com/t/cors-slim-preflight-request-fails/1992)._
