Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# intentionally left empty — makes backend a package for making
# it as importable from the outside
# it as importable from the outside

from flask import Flask
from flask_cors import CORS

app = Flask(__name__)

# Restrict CORS to your deployed frontend domain
CORS(app, resources={
r"/api/*": {"origins": "https://your-frontend.example.com"}
})