Add option to enable a simple CORS implementation for the api server

This commit is contained in:
Jessica Forrester
2014-09-02 12:28:24 -04:00
parent a4e3a4e351
commit 8723eece49
11 changed files with 161 additions and 59 deletions

View File

@@ -39,6 +39,7 @@ set +e
API_PORT=${API_PORT:-8080}
API_HOST=${API_HOST:-127.0.0.1}
API_ENABLE_CORS=${API_ENABLE_CORS:-false}
KUBELET_PORT=${KUBELET_PORT:-10250}
GO_OUT=$(dirname $0)/../_output/go/bin
@@ -48,7 +49,8 @@ APISERVER_LOG=/tmp/apiserver.log
--address="${API_HOST}" \
--port="${API_PORT}" \
--etcd_servers="http://127.0.0.1:4001" \
--machines="127.0.0.1" >"${APISERVER_LOG}" 2>&1 &
--machines="127.0.0.1" \
--enable_cors="${API_ENABLE_CORS}" >"${APISERVER_LOG}" 2>&1 &
APISERVER_PID=$!
CTLRMGR_LOG=/tmp/controller-manager.log