Skip to content

Commit

Permalink
Fix: Do not restrict with CORS headers
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktHeinrichs committed May 28, 2024
1 parent 7cbd562 commit 6bed3ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MetadataExtractor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.6"
__version__ = "0.4.7"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ PyMuPDF==1.20.2
nltk>=3.7
werkzeug==2.3.7
flask>=2.3.3
flask-cors>=1.10.3
flask-restx>=0.5.1
pygments>=2.10.0
python-magic==0.4.25;sys_platform!='win32'
Expand Down
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import Flask, request, jsonify, Response
from flask_cors import CORS
from flask_restx import Api, Resource, fields, inputs
from werkzeug.datastructures import FileStorage
import os
Expand All @@ -21,6 +22,7 @@
log = logging.getLogger(__name__)

app = Flask(__name__)
CORS(app) # Enables CORS for all routes
app.config["MAX_CONTENT_LENGTH"] = os.environ.get(
"MAX_CONTENT_LENGTH", 500 * 1000 * 1000
)
Expand Down

0 comments on commit 6bed3ac

Please sign in to comment.