# Access docker API from webserver container - CORS problem

**URL:** <https://forums.docker.com/t/access-docker-api-from-webserver-container-cors-problem/5462>\
**Category:** General\
**Created:** [January 8, 2016, 7:44am UTC](https://forums.docker.com/t/access-docker-api-from-webserver-container-cors-problem/5462 "2016-01-08T07:44:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctammes](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@ctammes](https://forums.docker.com/u/ctammes)\
**Post date:** [January 8, 2016, 7:44am UTC](https://forums.docker.com/t/access-docker-api-from-webserver-container-cors-problem/5462/1 "2016-01-08T07:44:50Z")

</div>

I made a webserver container to issue ajax calls to the docker API. I changed DOCKER\_OPTS in /etc/defalt/docker to include the dockerhost IP-addres plus port and " --api-cors-header=http://localhost:8880" to allow access from my container.  
All this works fine, as long as I issue GET requests. But with POST and DELETE requests, I get CORS related errors.

My question is, is this technique (access docker API from a container) implemented for POST and DELETE requests?  
Is it possible to include more than one host or port in the --api-cors-header option (not using \*)?
