fix cors
This commit is contained in:
parent
df126e5ae1
commit
7e9f74cbff
1 changed files with 3 additions and 2 deletions
5
main.py
5
main.py
|
|
@ -248,6 +248,9 @@ def update_loop():
|
|||
|
||||
time.sleep(600) # 10 minutes
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
|
||||
@app.route("/artists.html")
|
||||
def serve_artists_html():
|
||||
return send_file(HTML_FILENAME, mimetype="text/html")
|
||||
|
|
@ -277,8 +280,6 @@ def serve_next_static(filename):
|
|||
def page_not_found(e):
|
||||
return send_file("templates/404.html", mimetype="text/html"), 404
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
|
||||
if __name__ == "__main__":
|
||||
threading.Thread(target=update_loop, daemon=True).start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue