I have the following flask method that simple returns back the value of the Authorization header:
@app.route('/test', methods=['POST'])
def test():
return jsonify({"data" : request.headers.get('Authorization') })
When I submit the following curl request to my API which has been deployed to a DO instance, the header comes back as null:
curl --data '' -H "Authorization: test" api.mysite.com/test
{
"data": null
}
Yet when I submit the same request on my instance running locally it returns the header contents
{
"data": "test"
}
Any ideas?