Added SameSite views

This commit is contained in:
Felipe M 2020-09-21 13:13:09 +02:00
parent 5419449c72
commit c8458dabcb
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 21 additions and 0 deletions

21
app.py
View File

@ -159,5 +159,26 @@ def request_view():
)
@app.route("/samesite")
def samesite_view():
hostname = os.environ.get("HOSTNAME")
return f"""
<html>
<head>
<title>SameSite on {hostname}</title>
</head>
<body>
SameSite on {hostname} <br />
<iframe src=\"/samesite/iframe\" title=\"samesite test\">
</body>
</html>"""
@app.route("/samesite/iframe")
def samesite_iframe_view():
hostname = os.environ.get("HOSTNAME")
return f"iframe on {hostname}"
if __name__ == "__main__":
app.run(debug=True, port=8080, host="0.0.0.0")