mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
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:
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user