Skip to content

Commit b8d6581

Browse files
optimize the init.
1 parent 3cebb48 commit b8d6581

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

app/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def create_app(config_class=Config):
1818
print("Flask created")
1919

2020
CORS(app)
21-
# limiter.init_app(app)
2221
app.config.from_object(config_class)
2322
print("config loaded")
2423
db.init_app(app)
@@ -36,9 +35,6 @@ def create_app(config_class=Config):
3635
request_service = ServiceRequestService(request_repo,app.logger)
3736
app.config["request_service"] = request_service
3837

39-
# app.config["service"] = None
40-
# app.config["request_service"] = None
41-
4238
#loggin setup
4339
formatter = logging.Formatter("%(asctime)s | %(levelname)s | %(message)s")
4440

@@ -61,8 +57,9 @@ def create_app(config_class=Config):
6157
"style-src":["'self'","'unsafe-inline'"]
6258
}
6359

64-
#temporary commenting the talisman.
65-
# Talisman(app,content_security_policy=csp,force_https=False)
60+
limiter.init_app(app)
61+
Talisman(app,content_security_policy=csp,force_https=False)
62+
6663
#register routes and errors
6764
from app.routes import register_routes
6865
from app.errors import register_error_handlers

0 commit comments

Comments
 (0)