Add CDN cache invalidation to deploy scripts.

This commit is contained in:
2019-09-25 10:48:46 -05:00
parent 5c81d756df
commit cfd5463b4d
3 changed files with 32 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
host="${PM_API_HOST:-localhost:8081}"
api_base_url="${PM_API_BASE_URL:-http://localhost:8081}"
if [ $# -eq 1 ]; then
url="$1"
method="GET"
@ -19,6 +19,6 @@ curl -s -X "$method" \
-H "Content-Type: application/json" \
-H "Authorization: $(cat credential)" \
-H "Origin: https://curl.localhost" \
"http://${host}/api/$url" \
"${api_base_url}/api/$url" \
-d "$data" \
-v