Skip to content

fix : add Cache-Control headers to badge endpoint SVG responses #1476

Description

@tmdeveloper007

Summary of What Needs to be Done:
The public badge endpoint (GET /api/v1/badge/{system_id}) returns an SVG compliance badge without any Cache-Control headers. This means every browser request for the badge triggers a fresh database query and SVG render, adding unnecessary load for a static, public resource that changes only when the compliance status changes.

Changes that Need to be Made:

  • backend/app/api/v1/badge.py: Add Cache-Control header (public, max-age=3600) to the SVG Response returned by the badge endpoint.

Impact that it would Provide:

  • Reduces server load from repeated badge requests
  • Improves page load times for dashboards that display many badges
  • Follows HTTP caching best practices for immutable static resources

Note: Please assign this issue to the tmdeveloper007 account.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions