<p>Not really anything to do with Craft or the ElementAPI plugin, but you can enable CORS at the Apache/.htaccess level <a href="http://enable-cors.org/server_apache.html" rel="nofollow noreferrer">easy enough</a>.</p>

CC BY-SA 3.0
2016-11-15T21:11:10.243Z
2016-11-15T21:11:10.243Z
Brad Bell
<p>I was wondering if there is way to enable CORS for the ElementAPI plugin? I want to be able to call the API from the website and not allow external client to access the API</p>

<plugin-elementapi>
Enable CORS on ElementAPI
# Enable CORS on ElementAPI

(Asked by: username_0 on 2016-11-15)

I was wondering if there is way to enable CORS for the ElementAPI plugin? I want to be able to call the API from the website and not allow external client to access the API

**Tags:** plugin-elementapi


---

## 1 answers

### Answer by username_1 on 2016-11-15. Score: 1

Not really anything to do with Craft or the ElementAPI plugin, but you can enable CORS at the Apache/.htaccess level [easy enough](http://enable-cors.org/server_apache.html).


---

