Added requests interceptors support. IP addresses can now be banned.

This commit is contained in:
Daniele Maglie 2024-01-19 15:25:53 +01:00
parent f3ed518b65
commit 183fa3e27a
14 changed files with 196 additions and 208 deletions

View file

@ -7,13 +7,17 @@ from v1.routes import APIv1
from application import Application
api_config = Config('api').get('general')
application_config = Config('application').get('general')
api_config = Config('application').get('api')
if __name__ == "__main__":
app = Application(
# wether to run the application using debug mode
debug = api_config['debug'],
# useful for CORS settings
domain = application_config['domain'],
# load current routes
handlers = APIv1.routes,