mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-26 00:22:10 +03:00
21 lines
457 B
Python
21 lines
457 B
Python
from app import app
|
|
from flask import redirect, Response
|
|
|
|
|
|
@app.route("/redirect-absolute")
|
|
def redirect_absolute():
|
|
return redirect("http://localhost:8000/redirected")
|
|
|
|
|
|
@app.route("/redirect-relative")
|
|
def redirect_relative():
|
|
response = Response(status=302)
|
|
response.headers["Location"] = "/redirected"
|
|
response.autocorrect_location_header = False
|
|
return response
|
|
|
|
|
|
@app.route("/redirected")
|
|
def redirected():
|
|
return "Redirected"
|