Merge pull request #1133 from jwforres/enable_cors

Add option to enable a simple CORS implementation for the api server
This commit is contained in:
Daniel Smith
2014-09-11 13:59:14 -07:00
12 changed files with 250 additions and 70 deletions

View File

@@ -39,6 +39,8 @@ set +e
API_PORT=${API_PORT:-8080}
API_HOST=${API_HOST:-127.0.0.1}
# By default only allow CORS for requests on localhost
API_CORS_ALLOWED_ORIGINS=${API_CORS_ALLOWED_ORIGINS:-127.0.0.1:.*,localhost:.*}
KUBELET_PORT=${KUBELET_PORT:-10250}
GO_OUT=$(dirname $0)/../_output/go/bin
@@ -48,7 +50,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" \
--cors_allowed_origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 &
APISERVER_PID=$!
CTLRMGR_LOG=/tmp/controller-manager.log