Chore(config): Add CSP nonce placeholder to Vite configuration#27568
Merged
chirag-madlani merged 1 commit intomainfrom Apr 21, 2026
Merged
Chore(config): Add CSP nonce placeholder to Vite configuration#27568chirag-madlani merged 1 commit intomainfrom
chirag-madlani merged 1 commit intomainfrom
Conversation
Code Review ✅ ApprovedIntegrates a CSP nonce placeholder into the Vite configuration to support secure content policies. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
shah-harshit
approved these changes
Apr 21, 2026
Rohit0301
approved these changes
Apr 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the UI build configuration to support CSP nonces end-to-end by ensuring Vite-generated HTML receives a nonce placeholder that the Java backend can replace at runtime (consistent with the existing ${cspNonce} replacement pattern already used when serving index.html).
Changes:
- Add
html.cspNoncetovite.config.tswith a${cspNonce}placeholder for runtime replacement by the backend.
Contributor
|
Contributor
🟡 Playwright Results — all passed (22 flaky)✅ 3689 passed · ❌ 0 failed · 🟡 22 flaky · ⏭️ 89 skipped
🟡 22 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Rohit0301
pushed a commit
that referenced
this pull request
Apr 22, 2026
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.



This pull request introduces a configuration update to the Vite build setup to support Content Security Policy (CSP) nonces. The change allows the Java backend to inject a CSP nonce value at runtime, improving the application's security posture.
Security and configuration improvements:
html.cspNonceplaceholder to the Vite configuration invite.config.ts, enabling the Java backend to inject a CSP nonce at runtime for enhanced Content Security Policy support.Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>