HERMES-GIELIE/api
Cyprian Kowalczyk 392bc5df6e
fix: add Content-Security-Policy and Permissions-Policy headers (#197)
Add CSP and Permissions-Policy headers to _security_headers() for
defense-in-depth against XSS and unwanted browser feature access.

CSP policy:
  default-src 'self' — only load resources from same origin
  script-src 'self' — prevent inline/remote script injection
  style-src 'self' 'unsafe-inline' — allow themes (inline styles)
  img-src 'self' data: — allow workspace images and data URIs
  font-src 'self' data: — allow web fonts
  connect-src 'self' — only allow fetch/XHR to same origin
  base-uri 'self'; form-action 'self' — prevent base/form injection

Permissions-Policy: disable camera, microphone, geolocation.

Addresses #193.
2026-04-09 18:07:07 -07:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py fix(auth): prune expired sessions on every verify to prevent memory leak (#196) 2026-04-09 18:05:23 -07:00
config.py feat: pluggable i18n with English/Chinese language switcher in Settings 2026-04-08 18:57:50 -07:00
helpers.py fix: add Content-Security-Policy and Permissions-Policy headers (#197) 2026-04-09 18:07:07 -07:00
models.py release: v0.39.0 — security hardening, 12 fixes (#171) 2026-04-07 22:26:03 -07:00
profiles.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
routes.py fix: surface approval prompt in UI instead of getting stuck in Thinking (#187) 2026-04-08 20:16:22 -07:00
state_sync.py fix: sync message_count to state.db for /insights (#163) (#164) 2026-04-06 22:56:27 -07:00
streaming.py fix: surface approval prompt in UI instead of getting stuck in Thinking (#187) 2026-04-08 20:16:22 -07:00
updates.py fix: apply_update concurrency lock, boot.js settings-fail guard, dead workspace code, test_updates URL param 2026-04-05 16:20:12 +00:00
upload.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
workspace.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00