Add flag to enable cross domain requests in 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. Also added a handler for OPTIONS requests the standard for cross domain requests is to initially make an OPTIONS request to the api. Upstream-commit: 6d5bdff3942ce5e030b2cbd1510f418de25a1a53 Component: engine
This commit is contained in:
@ -1056,3 +1056,11 @@ Here are the steps of 'docker run' :
|
||||
|
||||
In this first version of the API, some of the endpoints, like /attach, /pull or /push uses hijacking to transport stdin,
|
||||
stdout and stderr on the same socket. This might change in the future.
|
||||
|
||||
|
||||
3.3 CORS Requests
|
||||
-----------------
|
||||
|
||||
To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
docker -d -H="192.168.1.9:4243" -api-enable-cors
|
||||
|
||||
Reference in New Issue
Block a user