Skip to content

Commit

Permalink
Merge branch 'main' into nm/fix-wrong-password-message
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k authored Sep 4, 2024
2 parents dc3ce47 + b95c61c commit 4a2bd4a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions fixbackend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,23 @@ async def custom_ui(hash: str) -> Response:
headers["X-Content-Type-Options"] = "nosniff"
headers["X-Frame-Options"] = "DENY"
headers["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains; preload"
headers["Referrer-Policy"] = "origin-when-cross-origin"
headers["Permissions-Policy"] = (
"notifications=(self),"
" payment=(self),"
" fullscreen=(self),"
" geolocation=(),"
" camera=(),"
" microphone=(),"
" accelerometer=(),"
" gyroscope=(),"
" magnetometer=(),"
" usb=(),"
" vr=(),"
" xr-spatial-tracking=(),"
" autoplay=(),"
" midi=()"
)
headers["Content-Security-Policy"] = (
"default-src 'self' https://cdn.fix.security;"
f" connect-src 'self' data: https://cdn.fix.security https://capture.trackjs.com https://ph.fix.security;"
Expand Down Expand Up @@ -337,6 +354,23 @@ async def root(_: Request) -> Response:
headers["X-Content-Type-Options"] = "nosniff"
headers["X-Frame-Options"] = "DENY"
headers["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains; preload"
headers["Referrer-Policy"] = "origin-when-cross-origin"
headers["Permissions-Policy"] = (
"notifications=(self),"
" payment=(self),"
" fullscreen=(self),"
" geolocation=(),"
" camera=(),"
" microphone=(),"
" accelerometer=(),"
" gyroscope=(),"
" magnetometer=(),"
" usb=(),"
" vr=(),"
" xr-spatial-tracking=(),"
" autoplay=(),"
" midi=()"
)
headers["Content-Security-Policy"] = (
"default-src 'self' https://cdn.fix.security;"
f" connect-src 'self' data: https://cdn.fix.security https://capture.trackjs.com https://ph.fix.security;"
Expand Down
2 changes: 2 additions & 0 deletions fixbackend/cloud_accounts/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ def update_state(cloud_account: CloudAccount) -> CloudAccount:
scan=scan,
)
return evolve(cloud_account, state=CloudAccountStates.Configured(access, enabled, scan))
case CloudAccountStates.Degraded():
return evolve(cloud_account, state=evolve(cloud_account.state, scan=scan))
case _: # pragma: no cover
raise WrongState(f"Account {cloud_account_id} is not configured, cannot enable account")

Expand Down

0 comments on commit 4a2bd4a

Please sign in to comment.