Skip to content

Instantly share code, notes, and snippets.



Created Dec 28, 2019
What would you like to do?
simple flask app for password redirects
from flask import Flask, redirect
app = Flask(__name__)
def hello_world():
return 'Page with password form!'
urls = {
"googlepass": "",
"youtubepass": ""
@app.route('/go', methods=['POST'])
def go():
password = request.form.get("password", "")
url = urls.get(password, "/404")
return redirect(url)
def oops():
return "Wrong password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment