disable cors UwU
This commit is contained in:
parent
b4006fb96c
commit
692bdb9c10
8
main
8
main
|
@ -96,6 +96,14 @@ def check_username_taken(username):
|
|||
return "error"
|
||||
return post["id"]
|
||||
|
||||
# Disable CORS
|
||||
@app.after_request
|
||||
async def add_cors_headers(response):
|
||||
response.headers.add("Access-Control-Allow-Origin", "*")
|
||||
response.headers.add("Access-Control-Allow-Headers", "*")
|
||||
response.headers.add("Access-Control-Allow-Methods", "*")
|
||||
return response
|
||||
|
||||
# Main page
|
||||
@app.route("/")
|
||||
async def main():
|
||||
|
|
Loading…
Reference in New Issue