본문으로 건너뛰기
Skillpedia
보안75k · #2993

referrer-policy

하는 일

이 스킬은 사이트가 보내는 헤더를 확인하고, 다른 사이트와 공유되는 주소 정보를 제한하는 Referrer-Policy를 설정합니다. 민감한 링크와 토큰을 보호하려는 개발자를 위한 것입니다.

사용하는 경우

  • ✓웹사이트의 보안 헤더를 검토해 달라고 요청할 때.
  • ✓페이지 주소에 토큰이나 ID가 들어 있고, 그것이 새지 않게 하고 싶을 때.
  • ✓로그인이나 세션을 다루는 앱을 강화할 때.

스킬 링크

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/referrer-policy/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/referrer-policy/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 비밀번호 재설정 링크에는 토큰이 들어 있습니다. 사람들이 링크를 클릭해도 그 토큰이 다른 사이트로 새지 않게 해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 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
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬