I am trying to redirect a user to an external URL and also add a Referer
domain in the Request Headers
.
(我正在尝试将用户重定向到外部URL,并在“ Request Headers
添加Referer
域。)
Let's say I want the referer to be https://www.ExampleDomain.com/
(假设我希望推荐人为https://www.ExampleDomain.com/
)
I have written the code below but I can't figure out how to add a referer
.
(我已经在下面编写了代码,但是我不知道如何添加referer
。)
from flask import Flask, redirect
app = Flask(__name__)
@app.route('/')
def example():
return redirect("https://youtube.com")
if __name__ == "__main__":
app.run(debug=True)
ask by Anatol translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…