Hi all, I've just deployed my application to pythonanywhere and it all seems to be running fine except for one blocking issue.
When my App makes an authenticated request, it does so with the following headers:
{
"Authentication-Token": "XXXX",
"Content-Type": "application/json"
}
When I make a request with the above header order, I get a '401 Unauthorized'
- Now the issue seems to be the order of the headers - and I've replicated this with Postman - when the 'Content-Type'
header is before 'Authentication-Token'
then the request works as expected. i.e:
{
"Content-Type": "application/json",
"Authentication-Token": "XXXX"
}
Everywhere I've looked online, says that header order shouldn't matter. On the client side I'm using AngularJS and Ionic, and there doesn't appear to be any way to control the order - it comes through ordered alphabetically as far as I can tell due to it using hash-keys as the enumeration anchor.
When I develop locally, I don't have any issues - so it appears to be something that the web server or flask framework needs to be configured to handle.
Anyone have any ideas that don't require me to modify AngularJS (joking, obviously...)
Best -Danu