fix: pass bearer token to curl using -H instead of --oauth2-bearer

The flag `--oauth2-bearer` might have no effect in some environment.

Signed-off-by: knight42 <anonymousknight96@gmail.com>
This commit is contained in:
knight42
2020-11-05 01:15:19 +08:00
parent e54448a307
commit 00e4234cc9
4 changed files with 6 additions and 9 deletions

View File

@@ -97,7 +97,7 @@ fi
kube::log::status "Updating " "${OPENAPI_ROOT_DIR}"
curl -w "\n" -kfs --oauth2-bearer dummy_token "https://${API_HOST}:${API_PORT}/openapi/v2" | jq -S '.info.version="unversioned"' > "${OPENAPI_ROOT_DIR}/swagger.json"
curl -w "\n" -kfsS -H 'Authorization: Bearer dummy_token' "https://${API_HOST}:${API_PORT}/openapi/v2" | jq -S '.info.version="unversioned"' > "${OPENAPI_ROOT_DIR}/swagger.json"
kube::log::status "SUCCESS"