diff --git a/backend/README.md b/backend/README.md index 347de767cbe8190a674e3f00a4c0f00af7cc9aaf..2b8ffd485d995f132273f22e6c2381a560b68ebb 100644 --- a/backend/README.md +++ b/backend/README.md @@ -54,4 +54,21 @@ https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-20-query // Redirect user to another page upon successful login }; +``` + +```python + +# Create Flask app +app = Flask(__name__) + +# Enable CSRF on all api endpoints +csrf = CSRFProtect(app) + +# Define Content Security Policies +talisman = Talisman(app, content_security_policy=csp) + +# Initialize Flask-Security +user_datastore = SQLAlchemyUserDatastore(db, User, Role) +app.security = Security(app, user_datastore) + ``` \ No newline at end of file