referrer-policy
यह क्या करती है
यह स्किल साइट के भेजे गए हेडर जाँचती है और Referrer-Policy सेट करती है, जो सीमित करती है कि दूसरी साइटों के साथ कौन-सी पता जानकारी साझा हो। यह उन डेवलपर्स के लिए है जो संवेदनशील लिंक और टोकन सुरक्षित रखना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप एजेंट से किसी वेबसाइट के सुरक्षा हेडर की समीक्षा करवाएँ।
- ✓जब आपके पेजों के पते में निजी टोकन या ID हों और आप उनका लीक होना रोकना चाहें।
- ✓जब आप लॉगिन या सेशन संभालने वाले ऐप को मज़बूत कर रहे हों।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/referrer-policy/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे पासवर्ड रीसेट लिंक में टोकन होते हैं। क्या आप पक्का कर सकते हैं कि कोई लिंक क्लिक होने पर वे टोकन दूसरी साइटों तक न पहुँचें?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट जाँचता है कि Referrer-Policy हेडर भेजा जा रहा है या नहीं, और उसे एक अनुशंसित डिफ़ॉल्ट strict-origin-when-cross-origin पर सेट करता है। बहुत संवेदनशील पते वाले पेजों के लिए वह और सख़्त सेटिंग सुझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Set a Referrer-Policy header
Without a Referrer-Policy, a password reset link like https://example.com/reset?token=abc123 is included in the Referer header when the user clicks an external link on that page — leaking the token to third parties.
Quick Reference
- Use
Referrer-Policy: strict-origin-when-cross-origin— the recommended modern default strict-origin-when-cross-originsends the full URL for same-origin requests, only the origin for cross-origin HTTPS, and nothing for HTTPS→HTTP- Never use
unsafe-url— it sends the full URL including path and query string to every external site - Can be set via HTTP header,
<meta>tag, or thereferrerpolicyattribute on individual<a>and<img>elements - Sensitive URLs (reset tokens, private IDs) in query strings can be exposed via the Referer header if policy is too permissive
Check
Check whether the server sends a Referrer-Policy header and verify the value is appropriate. The recommended value is strict-origin-when-cross-origin. Check for any pages with sensitive URL parameters that could be leaked via the Referer header.
Fix
Add Referrer-Policy: strict-origin-when-cross-origin to all HTTP responses. Configure it in your web server, CDN, or application framework. For pages with particularly sensitive URLs, consider no-referrer or same-origin.
Explain
Explain what the Referer header contains, how a permissive Referrer-Policy can leak sensitive URL parameters to third parties, and what the difference is between the various Referrer-Policy values.
Code Review
Review server config, headers, forms, and integration points related to Set a Referrer-Policy 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/referrer-policy
अक्सर पूछे जाने वाले सवाल
strict-origin-when-cross-origin क्या करता है?
यह आपकी अपनी साइट को पूरा पता भेजता है, दूसरी HTTPS साइटों को केवल साइट का नाम, और HTTPS से HTTP पर जाते समय कुछ नहीं।
unsafe-url से क्यों बचें?
स्किल कहती है कि यह हर बाहरी साइट को पूरा पता भेजता है, जिसमें पाथ और क्वेरी शामिल हैं।
यह नीति और कहाँ सेट हो सकती है?
स्किल कहती है कि इसे meta टैग से या अलग-अलग लिंक और इमेज पर भी सेट किया जा सकता है।
जानकारी
लेखक का मूल विवरण
Use when reviewing HTTP response headers for privacy hardening on any website that handles authentication, session state, or sensitive URL parameters.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2993
- लाइसेंस
- 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, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।