मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी75k · #2993

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/referrer-policy/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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-origin sends 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 the referrerpolicy attribute 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.

repo: thedaviddias/Front-End-Checklist

लोकप्रियता

GitHub स्टार
75k
रैंकिंग में स्थान
#2993
लाइसेंस
MIT
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills