dotcloud/docker — pull request #806 by crosbymichael (2013-06-04 01:46:55+00:00)
Title: Add flag to enable cross domain requests in Remote Api

Add the **-api-enable-cors** flag when running docker
in daemon mode to allow CORS requests to be made to
the Remote Api. The default value is false for this
flag to not allow cross origin request to be made.

When the flag is set to true, the api will add the Access-Control-Allow-Origin and Access-Control-Allow-Headers to the response so that in browser requests can be made to the api.

Also adds a handler for OPTIONS requests. The standard
for cross domain requests is to initially make an
OPTIONS request to an api.

Example:

docker -d -H="192.168.1.9:4243" -api-enable-cors