I am newbie in python and flask and trying to redirect a url with headers and unable to navigate, please provide me an example to solve the issue.
@app.route('/somepage')
def somepage():
headers={'SomeName':'whatever'}
return Response(redirect(url_for('home_page')),status=302, headers=headers)
@app.route('/home_page')
def home_page():
if request.headers['SomeName'] == 'whatever':
return render_template("home_page.html")
else:
return Response(status=405)