# How to disable CORS policy in POST API in web dev module

**URL:** <https://forum.inductiveautomation.com/t/how-to-disable-cors-policy-in-post-api-in-web-dev-module/64452>\
**Category:** Ignition\
**Created:** [September 25, 2022, 6:45am UTC](https://forum.inductiveautomation.com/t/how-to-disable-cors-policy-in-post-api-in-web-dev-module/64452 "2022-09-25T06:45:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 25, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/how-to-disable-cors-policy-in-post-api-in-web-dev-module/64452/2 "2022-09-25T14:24:06Z")

</div>

There doesn't appear to be an easy way to do this, still.

You have to manipulate the response headers yourself instead.

> [@Enable CORS for WebDev](https://forum.inductiveautomation.com/t/enable-cors-for-webdev/38655/4):
>
> Your actual response headers will change based on the input request and what you want to allow it to do. The basic structure should be something like this: from javax.servlet.http import HttpServletResponse servletResponse = request["servletResponse"] servletResponse.addHeader(someCorsHeaders, someCorsValue) # other headers based on incoming request servletResponse.setStatus(HttpServletResponse.SC\_NO\_CONTENT) See [Cross-Origin Resource Sharing (CORS) - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) for reference on what to send…

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-disable-cors-policy-in-post-api-in-web-dev-module/64452)._
