Skip to content

Add workers.dev Route #3

Add workers.dev Route

Add workers.dev Route #3

Workflow file for this run

name: Fix DNS for natalie.acreonetionos.org
on:
workflow_dispatch:
permissions:
contents: read
jobs:
fix-dns:
runs-on: ubuntu-latest
steps:
- name: Check token permissions and try DNS fix
env:
CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
set -x
ZONE_ID="5b3f8237bfa2518bff375eb8163623a5"
echo "=== Check token permissions ==="
PERMS=$(curl -s -H "Authorization: Bearer $CF_API_TOKEN" \
"https://api.cloudflare.com/client/v4/user/tokens/verify")
echo "$PERMS" | jq .
echo "=== Try different DNS API endpoints ==="
# Try listing DNS records
echo "--- List DNS records ---"
curl -s -H "Authorization: Bearer $CF_API_TOKEN" \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A&name=natalie" | jq .
echo "--- Try to add CNAME instead of A (maybe CNAME is allowed) ---"
curl -s -X POST \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records" \
-H "Authorization: Bearer $CF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "CNAME",
"name": "natalie",
"content": "spivanatalie64.github.io",
"ttl": 1,
"proxied": true
}' | jq .
echo "=== Done ==="