Skip to content

Instantly share code, notes, and snippets.

@gfodor
Created March 20, 2020 21:21
Show Gist options
  • Save gfodor/b396f109bc00e4285afb78508646b2fc to your computer and use it in GitHub Desktop.
Save gfodor/b396f109bc00e4285afb78508646b2fc to your computer and use it in GitHub Desktop.
Set Non-CORS Proxy Domains script
#!/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