Skip to content

fix: SSE headers, future timestamp rejection, config caching, HSTS (#702 #703 #704 #705) - #765

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
luciachizaram:fix/sse-headers-future-timestamps-cache-hsts
Oct 18, 2026
Merged

nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
luciachizaram:fix/sse-headers-future-timestamps-cache-hsts

Conversation

@luciachizaram

@luciachizaram luciachizaram commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four issues (#702, #703, #704, #705):

Fixes #702 — SSE streaming headers

  • Added Cache-Control: no-cache, no-store, must-revalidate and Connection: keep-alive headers to streaming interceptor responses
  • Ensures SSE clients can properly parse the stream

Fixes #703 — Reject future-dated oracle readings

  • Added timestamp validation in persistReading() that rejects readings more than 60 seconds in the future
  • Prevents corrupt claim trigger logic from future-dated data
  • Added tests for future timestamp rejection and within-tolerance acceptance

Fixes #704 — Cache Stellar network config

  • Cached networkPassphrase, horizonUrl, and rpcUrl at startup in constructor
  • Added explicit getters (horizonUrl, rpcUrl) exposing cached values
  • Eliminates repeated env lookups on hot path

Fixes #705 — Enable HSTS

  • Enabled Helmet HSTS with maxAge: 31536000 (1 year), includeSubDomains: true, preload: true
  • Prevents SSL stripping attacks

Closes #702
Closes #703
Closes #704
Closes #705

- Set Cache-Control and Connection headers in streaming interceptor for SSE (Parashield-Protocol#702)
- Reject future-dated oracle readings with 60s clock skew tolerance (Parashield-Protocol#703)
- Cache network passphrase, horizon URL, and RPC URL at startup in StellarService (Parashield-Protocol#704)
- Enable HSTS via Helmet with 1-year max-age, includeSubDomains, preload (Parashield-Protocol#705)
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@luciachizaram Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nonsobethel0-dev
nonsobethel0-dev merged commit eca3f1e into Parashield-Protocol:main Oct 18, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants