Skip to content

Commit

Permalink
Add simple CORS headers
Browse files Browse the repository at this point in the history
  • Loading branch information
anybodys committed Jun 2, 2024
1 parent 021c0eb commit 2b0932d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions votingapi/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "pypi"
flask = "*"
google-cloud-storage = "*"
gunicorn = "*"
flask-cors = "*"

[dev-packages]
pytest = "*"
Expand Down
22 changes: 15 additions & 7 deletions votingapi/Pipfile.lock

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

2 changes: 2 additions & 0 deletions votingapi/voting/api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from flask import Flask, jsonify, request
from flask_cors import CORS

from voting.storage import art_storage, db


def create_app():
app = Flask(__name__)
CORS(app)
return app


Expand Down

0 comments on commit 2b0932d

Please sign in to comment.