Created
March 14, 2024 01:45
-
-
Save kyouheicf/4699c1bcb375ccaa97e494e51217964f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Set Private Application Name | |
export PRIVATE_APP_NAME='aa' | |
# Get current config json | |
http -A creds GET https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps \ | |
| jq -r '.result[] | select (.name == "'$PRIVATE_APP_NAME'")' > private-app.json | |
# Set Private Application UUID | |
export PRIVATE_APP_UUID=$(cat private-app.json | jq -r .id) | |
# Set "prompt" config parameter option | |
jq 'del(.id, .uid, .aud, .created_at, .updated_at) | .tags[0] = "private"' private-app.json > tmp && mv tmp private-app.json | |
# Update with "prompt" config parameter option | |
http -A creds PUT https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps/$PRIVATE_APP_UUID @private-app.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment