Add netlify.toml configuration to set X-Frame-Options header to DENY#935
Conversation
✅ Deploy Preview for gardener-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
X-Frame-Options header to DENY
📝 WalkthroughWalkthroughA Netlify configuration file is updated to add a security header rule that applies the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
X-Frame-Options header to DENYnetlify.toml configuration to set X-Frame-Options header to DENY
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: klocke-io The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: 98ec19540d8c06b7abc77f1c3a2be2922cdd17a4 |


How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
Although there's (currently) no real risk from clickjacking attacks and alike, we still would like to set the
X-Frame-Options: DENYheader. Using Netlify, this can be done with a special_headersfile in the public directory's root or with thenetlify.tomlfile. I find the latter more explicit, and it allows for better configuration options (ref).Which issue(s) this PR fixes:
n.a.
Special notes for your reviewer:
Once the preview has been deployed by Netlify, we can verify that the response header is set appropriately.
/cc @HeckEK @n-boshnakov
Summary by CodeRabbit