x-frame-options
यह क्या करती है
यह स्किल जाँचती है कि कोई साइट दूसरी वेबसाइटों को अपने पेज फ़्रेम में एम्बेड करने से रोकती है या नहीं। यह उन डेवलपर्स और सुरक्षा कर्मचारियों के लिए है जो ऐसी साइटें बचाते हैं जहाँ यूज़र लॉगिन करते या कार्रवाई करते हैं।
कब इस्तेमाल करें
- ✓जब लॉगिन या भुगतान वाली साइट पर फ़्रेमिंग सुरक्षा हेडर न हो।
- ✓जब सुरक्षा स्कैन clickjacking जोखिम बताए।
- ✓जब कोई साइट केवल अपने ही डोमेन पर एम्बेड होनी चाहिए।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-frame-options/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“सुरक्षा स्कैन बताता है कि मेरा लॉगिन पेज किसी दूसरी साइट के फ़्रेम में डाला जा सकता है। मैं उसे कैसे रोकूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक हेडर जोड़ता है जो दूसरी साइटों को पेज फ़्रेम करने से रोकता है, या फ़्रेमिंग को उसी डोमेन तक सीमित करता है। वह नई CSP frame-ancestors सेटिंग भी सुझा सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Set an X-Frame-Options header
Without framing protection, an attacker can embed your banking login page in a transparent iframe on a malicious site and trick users into clicking buttons they cannot see — transferring money, changing settings, or leaking credentials.
Quick Reference
- Use
X-Frame-Options: DENYto prevent all framing, orSAMEORIGINto allow framing only from your own domain ALLOWFROMis obsolete and unsupported in modern browsers — use CSPframe-ancestorsinstead- The modern equivalent is
Content-Security-Policy: frame-ancestors 'none'— prefer CSP for new sites - Both headers can coexist: X-Frame-Options for older browsers, frame-ancestors for modern ones
- Clickjacking attacks trick users into clicking invisible iframe buttons — DENY eliminates this entirely
Check
Check whether the server sends an X-Frame-Options header (DENY or SAMEORIGIN) or a Content-Security-Policy header with frame-ancestors directive to prevent clickjacking.
Fix
Add X-Frame-Options: DENY to all responses if the site does not need to be embedded anywhere. If legitimate framing is needed on the same origin, use SAMEORIGIN. For fine-grained control, use CSP frame-ancestors instead.
Explain
Explain what a clickjacking attack is, how X-Frame-Options and CSP frame-ancestors prevent it, and the difference between DENY and SAMEORIGIN values.
Code Review
Review server config, headers, forms, and integration points related to Set an X-Frame-Options header. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/x-frame-options
अक्सर पूछे जाने वाले सवाल
clickjacking क्या है?
यह ऐसा हमला है जिसमें छिपा हुआ फ़्रेम दुर्भावनापूर्ण साइट को यूज़र से ऐसे बटन दबवाने देता है जो वे देख नहीं सकते।
DENY और SAMEORIGIN में क्या अंतर है?
DENY सारी फ़्रेमिंग रोकता है, जबकि SAMEORIGIN केवल आपके अपने डोमेन से फ़्रेमिंग की अनुमति देता है।
क्या ALLOWFROM अब भी समर्थित है?
नहीं। स्किल कहती है कि यह अप्रचलित है और आधुनिक ब्राउज़रों में समर्थित नहीं।
जानकारी
लेखक का मूल विवरण
Use when reviewing HTTP response headers for clickjacking protection on any web application with authenticated user actions.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #3091
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।