Offline banner + security-header/CSP hardening audit (#1412, #1413, #1414, #1415) - #1437
Open
constantvictory wants to merge 1 commit into
Open
Conversation
- solutions-plug#1412: new useOnlineStatus hook (navigator.onLine + online/offline events, debounced to avoid flicker on flaky connections) and an OfflineBanner shown app-wide while offline. Statistics now pauses its auto-refresh while offline and resumes (with an immediate refetch) on reconnect. - solutions-plug#1413/solutions-plug#1414: verified already satisfied on main — proxy.ts sets CSP (no unsafe-inline in style-src), next.config.js sets HSTS/X-Frame- Options/X-Content-Type-Options/Referrer-Policy on every response, and no component uses inline style props. No inline styles found in an audit of src/components. - solutions-plug#1415: documented in proxy.ts why request/response sanitization doesn't apply — the frontend has no server-side proxy route that forwards to services/api or services/tts; all API calls go directly from the browser to the public NEXT_PUBLIC_API_URL, so there's no proxied response that could leak an internal upstream URL or a server-only env var. Closes solutions-plug#1412 Closes solutions-plug#1413 Closes solutions-plug#1414 Closes solutions-plug#1415
|
@constantvictory 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useOnlineStatushook +OfflineBanner). Statistics' auto-refresh now pauses while offline and resumes with an immediate refetch on reconnect.proxy.ts+next.config.jsalready attach CSP, HSTS,X-Frame-Options,X-Content-Type-Options, andReferrer-Policyto every response (existingsecurity-headers.test.ts/proxy.test.tscover this).style-srchas nounsafe-inline; audited all components for inlinestyleprops — none found.proxy.ts: the frontend has no server-side route that forwards requests toservices/api/services/tts(all API calls go browser →NEXT_PUBLIC_API_URLdirectly), so there is no proxied response to sanitize for leaked upstream URLs/env vars.Changes
frontend/src/lib/hooks/useOnlineStatus.ts(new)frontend/src/components/OfflineBanner.tsx,OfflineBanner.css(new)frontend/src/app/layout.tsx— mountOfflineBannerapp-widefrontend/src/components/Statistics.tsx— pause/resume auto-refresh on connectivity changefrontend/src/proxy.ts— explanatory note for [Security] Recreate API-proxy request/response tests #1415Tests intentionally skipped per request.
Closes #1412
Closes #1413
Closes #1414
Closes #1415
🤖 Generated with Claude Code