Created
March 20, 2020 21:21
-
-
Save gfodor/b396f109bc00e4285afb78508646b2fc to your computer and use it in GitHub Desktop.
Set Non-CORS Proxy Domains script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
HOST=$1 | |
TOKEN=$2 | |
DOMAINS=$3 | |
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -XPATCH -d "{ \"general\": { \"non_cors_proxy_domains\": \"$DOMAINS\" } }" "https://$HOST/api/ita/configs/hubs" | |
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -XPATCH -d "{ \"general\": { \"non_cors_proxy_domains\": \"$DOMAINS\" } }" "https://$HOST/api/ita/configs/spoke" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment