diff --git a/backend/__init__.py b/backend/__init__.py index c6077fd..7cd4d05 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -1,2 +1,12 @@ # intentionally left empty — makes backend a package for making -# it as importable from the outside \ No newline at end of file +# 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"} +})