Skip to content

Commit 58a94fc

Browse files
committed
Docker image now handles X-RosetteAPI-Key instead of user_key when checking alt_url
1 parent 0ff9e15 commit 58a94fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docker/run_python.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ if [ ! -z "${ALT_URL}" ]; then
5050
fi
5151

5252
#Checks for valid url
53-
match=$(curl "${ping_url}/ping" -H "user_key: ${API_KEY}" | grep -o "Rosette API")
53+
match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "Rosette API")
5454
if [ "${match}" = "" ]; then
5555
echo -e "\n${ping_url} server not responding\n"
5656
exit 1
5757
fi
5858

5959
#Checks if Rosette API key is valid
6060
function checkAPI {
61-
match=$(curl "${ping_url}/ping" -H "user_key: ${API_KEY}" | grep -o "forbidden")
61+
match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "forbidden")
6262
if [ ! -z $match ]; then
6363
echo -e "\nInvalid Rosette API Key"
6464
exit 1

examples/docker/run_python.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ if [ ! -z "${ALT_URL}" ]; then
4040
fi
4141

4242
#Checks for valid url
43-
match=$(curl "${ping_url}/ping" -H "user_key: ${API_KEY}" | grep -o "Rosette API")
43+
match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "Rosette API")
4444
if [ "${match}" = "" ]; then
4545
echo -e "\n${ping_url} server not responding\n"
4646
exit 1
4747
fi
4848

4949
#Checks if Rosette API key is valid
5050
function checkAPI {
51-
match=$(curl "${ping_url}/ping" -H "user_key: ${API_KEY}" | grep -o "forbidden")
51+
match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "forbidden")
5252
if [ ! -z $match ]; then
5353
echo -e "\nInvalid Rosette API Key"
5454
exit 1

0 commit comments

Comments
 (0)