use 302 redirect

This commit is contained in:
bretello 2024-06-14 20:41:00 +02:00
parent e8e69d76a8
commit 504a5a979f
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

3
app.py
View File

@ -35,6 +35,7 @@ def convert_to_wav(file_name: str):
def run_cassetta(cassetta: str): def run_cassetta(cassetta: str):
print("running cassetta")
command = [ command = [
"aplay", "aplay",
os.path.join("uploads", cassetta), os.path.join("uploads", cassetta),
@ -101,7 +102,7 @@ def run(cassetta: str):
thread = Thread(target=run_cassetta, args=(cassetta,)) thread = Thread(target=run_cassetta, args=(cassetta,))
thread.start() thread.start()
response = make_response(make_response("", 301)) response = make_response(make_response("", 302))
response.headers["Location"] = "/" response.headers["Location"] = "/"
return response return response