CSRF secret key bugfix, updated deps, compose yml: removed start_period key
This commit is contained in:
parent
8b61a6bf8d
commit
856241e58d
5 changed files with 6 additions and 10 deletions
|
@ -18,8 +18,7 @@ static_dir = str(
|
|||
# Main configuration
|
||||
class Settings(BaseSettings):
|
||||
debug: bool = False
|
||||
session_key: str = secrets.token_hex(32)
|
||||
csrf_key: str = secrets.token_hex(32)
|
||||
secret_key: str = secrets.token_hex(32)
|
||||
app_host: str = '127.0.0.1'
|
||||
app_port: int = 8000
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ for p in paths:
|
|||
# Add WTForms CSRF protection middlewares
|
||||
app.add_middleware(
|
||||
SessionMiddleware,
|
||||
secret_key=common.settings.session_key,
|
||||
secret_key=common.settings.secret_key,
|
||||
)
|
||||
app.add_middleware(
|
||||
CSRFProtectMiddleware,
|
||||
csrf_secret=common.settings.csrf_key,
|
||||
csrf_secret=common.settings.secret_key,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue