Skip to content

Add no-cache headers to webserver endpoints#239

Open
rianbk wants to merge 1 commit intobohdan-s:mainfrom
rianbk:fix/webserver-cache-headers
Open

Add no-cache headers to webserver endpoints#239
rianbk wants to merge 1 commit intobohdan-s:mainfrom
rianbk:fix/webserver-cache-headers

Conversation

@rianbk
Copy link
Copy Markdown
Contributor

@rianbk rianbk commented Dec 22, 2025

Summary

  • Adds Cache-Control, Pragma, and Expires headers to all webserver HTTP responses
  • Prevents browsers and proxies from caching stale inverter data
  • Applied to /, /metrics, /json, and /config endpoints

Test plan

  • Start SunGather with webserver enabled
  • Run curl -i http://localhost:8080/metrics and verify headers are present
  • Confirm no caching issues in browser when refreshing pages

Prevents browsers and proxies from caching stale inverter data by adding
Cache-Control, Pragma, and Expires headers to all HTTP responses.
@rianbk rianbk force-pushed the fix/webserver-cache-headers branch from 7814daa to ad11e01 Compare January 9, 2026 09:53
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.

1 participant