Skip to content

Conversation

@orhanrauf
Copy link
Contributor

@orhanrauf orhanrauf commented Oct 28, 2025

Implements CASA-49 compliance by adding Cache-Control middleware to prevent caching of sensitive data.

Changes

  • Add cache_control_middleware in backend/airweave/api/middleware.py
  • Register middleware in backend/airweave/main.py

Sets Cache-Control: no-store, private on all /api/v1/ endpoints while respecting existing SSE headers.

Compliance

Meets CASA-49 requirements for preventing caching of sensitive data in server components.

Closes ENG-187


Summary by cubic

Add middleware that sets Cache-Control: no-store, private on all API responses to prevent caching of sensitive data. Keeps existing Cache-Control headers intact (e.g., SSE) and fulfills CASA-49.

Add middleware to set Cache-Control: no-store, private headers on all
/api/v1/ endpoints to prevent caching of sensitive data at any layer.

- Add cache_control_middleware() in api/middleware.py
- Register middleware in main.py middleware stack
- Respects existing headers (SSE endpoints unchanged)

Meets CASA-49 compliance requirements.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants