add cors
This commit is contained in:
parent
b7368e8116
commit
22c12ce89d
3 changed files with 10 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
artists.csv
|
||||||
|
Artists.html
|
||||||
|
artists.xlsx
|
||||||
|
Trackerhub.zip
|
||||||
5
main.py
5
main.py
|
|
@ -10,6 +10,8 @@ import re
|
||||||
from flask import Flask, send_file, send_from_directory, abort
|
from flask import Flask, send_file, send_from_directory, abort
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
from flask_cors import CORS
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
ZIP_URL = "https://docs.google.com/spreadsheets/d/1S6WwM05O277npQbaiNk-jZlXK3TdooSyWtqaWUvAI78/export?format=zip"
|
ZIP_URL = "https://docs.google.com/spreadsheets/d/1S6WwM05O277npQbaiNk-jZlXK3TdooSyWtqaWUvAI78/export?format=zip"
|
||||||
|
|
@ -275,6 +277,9 @@ def serve_next_static(filename):
|
||||||
def page_not_found(e):
|
def page_not_found(e):
|
||||||
return send_file("templates/404.html", mimetype="text/html"), 404
|
return send_file("templates/404.html", mimetype="text/html"), 404
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
CORS(app)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
threading.Thread(target=update_loop, daemon=True).start()
|
threading.Thread(target=update_loop, daemon=True).start()
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@ Flask
|
||||||
requests
|
requests
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
lxml
|
lxml
|
||||||
|
flask-cors
|
||||||
Loading…
Add table
Add a link
Reference in a new issue