Skip to content

Instantly share code, notes, and snippets.

Created Mar 24, 2021
What would you like to do?
Gunicorn token authentication
cat $1 | while read TOKEN; do
content=$(curl -s -H "Authorization: Token $TOKEN" $2)
if echo $content | grep -qi unauth; then continue
else echo $content; break; exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment