This is how my login method looks like:
def login(): if request.method == "GET": return render_template('user/login.html') else: jwt_token = "xxxx" resp = redirect(url_for('home.index')) resp.headers.set('Authorization', "JWT {}".format(jwt_token)) return resp This works fine but the Authorization header does not make it to home.index page.
How do I tell flask to preserve this header on every request?
------Edit---------
This works if I add Token to Cookie as resp.set_cookie('Authorization', "JWT {}".format(json_data["access_token"])) but I would like to keep it in the Authorization Header.