Skip to content

Commit

Permalink
Allow cross-origin requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-maan committed Jun 15, 2024
1 parent c30ec1e commit e7cc486
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
37 changes: 36 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ annoy = "^1.17.3"
faiss-cpu = "^1.7.4"
psutil = "^5.9.6"
bs4 = "^0.0.1"
usearch = "2.9.2"
flask-cors = "^4.0.1"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from flask import request, send_file
from flask_api import FlaskAPI, status
from flask_cors import CORS

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
Expand All @@ -28,6 +29,7 @@
)

app = FlaskAPI(__name__)
CORS(app)
app.url_map.strict_slashes = False

import core.api as API
Expand Down

0 comments on commit e7cc486

Please sign in to comment.