Skip to content
Snippets Groups Projects
Commit ddbfd576 authored by Daniel Myrén's avatar Daniel Myrén
Browse files

Update README.md

parent d6e37b67
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment