80 lines
6.2 KiB
Markdown
80 lines
6.2 KiB
Markdown
---
|
|
title: MDN — Referrer-Policy
|
|
source_type: official-doc
|
|
url: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy
|
|
archive_url:
|
|
related_branches: [feature-frontend-large-object-transfer-contract]
|
|
related_projects: [ca-skeleton-frontend]
|
|
tags: [frontend, http, security, referrer, transfer]
|
|
created: 2026-07-28
|
|
---
|
|
|
|
# MDN — Referrer-Policy
|
|
|
|
> Layer: `raw/` — 외부 자료의 **원문 발췌·출처 기록**.
|
|
|
|
## 활용 branch (필수, 최소 1개+)
|
|
|
|
| Branch | 이 자료가 정당화하는 결정 |
|
|
|---|---|
|
|
| `[[raw/branch-notes/feature-frontend-large-object-transfer-contract]]` | presigned URL 유출 경로 중 **`Referer` 는 브라우저 기본값이 이미 막고 있고 남은 위험은 우리 로그·telemetry** 라는 `D2` 의 초점 이동 |
|
|
|
|
## 출처
|
|
|
|
- 원본 URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy
|
|
- 보조 URL:
|
|
- 아카이브 URL:
|
|
- 저자 / 조직: MDN Web Docs (Mozilla)
|
|
- 발행일: (문서 지속 갱신)
|
|
- 마지막 확인일: 2026-07-28
|
|
|
|
## 왜 저장했는지
|
|
|
|
branch 의 `D2` 가 "presigned URL 은 telemetry·로그·`Referrer` 어디에도 남기지 않는다" 로 세 경로를 나란히 놓았다. 세 경로의 **위험 크기가 같은지** 확인이 필요했다. 결과적으로 `Referer` 경로는 2020년 11월 이후 브라우저 기본 정책이 cross-origin 에서 path·query 를 이미 제거하고 있어 우리가 추가로 할 일이 적고, 실질 위험은 우리가 직접 쓰는 로그·telemetry 에 몰려 있다는 것이 드러났다. 세 경로를 같은 무게로 다루면 정작 위험한 쪽의 fixture 가 얇아진다.
|
|
|
|
## 핵심 인용
|
|
|
|
> [§Directives — no-referrer] "The `Referer` header will be omitted: sent requests do not include any referrer information."
|
|
|
|
> [§Directives — same-origin] "Send the origin, path, and query string when performing a same-origin request. Don't send the `Referer` header for cross-origin requests."
|
|
|
|
> [§Directives — strict-origin-when-cross-origin] "Send the origin, path, and query string when performing a same-origin request. For cross-origin requests send the origin (only) when the protocol security level stays same (HTTPS→HTTPS). Don't send the `Referer` header to less secure destinations (HTTPS→HTTP)."
|
|
|
|
> [§Directives — strict-origin-when-cross-origin, Note] "This is the default policy if no policy is specified, or if the provided value is invalid"
|
|
|
|
> [§Directives — unsafe-url] "Send the origin, path, and query string when performing any request, regardless of security."
|
|
|
|
> [§Directives — unsafe-url, Warning] "This policy will leak potentially-private information from HTTPS resource URLs to insecure origins. Carefully consider the impact of this setting."
|
|
|
|
## 추출된 주장
|
|
|
|
| Claim ID | Claim (이 자료가 직접 말하는 것) | Evidence quote | Strength | Applies to | Does not prove |
|
|
|---|---|---|---|---|---|
|
|
| C1 | 지정이 없거나 값이 잘못되면 기본 정책은 `strict-origin-when-cross-origin` 이다 | [§Note] "This is the default policy if no policy is specified, or if the provided value is invalid" | `official-reference` | 정책 미설정 문서 | 모든 브라우저가 이 기본값을 구현한다는 실측 |
|
|
| C2 | 그 기본값에서 **cross-origin 요청에는 origin 만** 가고 path·query 는 가지 않는다 | [§strict-origin-when-cross-origin] "For cross-origin requests send the origin (only) when the protocol security level stays same" | `official-reference` | cross-origin 요청 | same-origin 요청에서도 path 가 가려진다는 것 — same-origin 에는 path·query 가 그대로 간다 |
|
|
| C3 | `no-referrer` 는 `Referer` 를 완전히 생략한다 | [§no-referrer] "sent requests do not include any referrer information." | `official-reference` | 명시 설정 시 | 생략이 부작용 없이 안전하다는 것 (일부 서버는 referer 를 요구) |
|
|
| C4 | `unsafe-url` 은 보안 수준과 무관하게 origin·path·query 를 모두 보내며 MDN 은 이를 경고한다 | [§unsafe-url, Warning] "This policy will leak potentially-private information from HTTPS resource URLs to insecure origins." | `official-reference` | `unsafe-url` 설정 문서 | 기본값에서도 같은 유출이 일어난다는 것 — 오히려 반대다 |
|
|
| C5 | `same-origin` 정책은 cross-origin 요청에 `Referer` 를 아예 보내지 않는다 | [§same-origin] "Don't send the `Referer` header for cross-origin requests." | `official-reference` | 명시 설정 시 | 이 정책이 기본값이라는 것 |
|
|
|
|
## 적용 경계
|
|
|
|
- 이 자료가 직접 증명하는 것:
|
|
- `C1`+`C2`: **정책을 설정하지 않아도** cross-origin 으로 나가는 요청에는 path·query 가 붙지 않는다
|
|
- `C3`~`C5`: 더 강한 정책의 선택지와 `unsafe-url` 의 위험
|
|
- 이 자료가 증명하지 않는 것:
|
|
- presigned URL 이 `Referer` 로 유출될 수 있다는 것 — `Referer` 는 **요청을 유발한 문서의 URL** 이지 요청 대상 URL 이 아니다. presigned URL 이 우리 페이지 주소에 들어가 있지 않다면 이 경로로는 새지 않는다
|
|
- 로그·telemetry·에러 객체를 통한 유출 — 이 문서의 범위가 아니며, 그쪽이 실제 위험이다
|
|
- 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
|
|
- presigned URL 이 주소창·`history`·`document.referrer` 에 들어가는 코드 경로가 있는지 (있다면 그때부터 `Referer` 가 실제 유출 경로가 된다)
|
|
|
|
## 메모
|
|
|
|
- 인용 1 해석 후보 (미검증): `C1`+`C2` 는 `D2` 의 세 경로 중 `Referrer` 항목의 **우선순위를 낮춘다**. 브라우저 기본값이 이미 방어하므로, 이 branch 가 추가로 할 일은 "presigned URL 을 페이지 URL 에 넣지 않는다" 는 금지 규칙 하나다.
|
|
- 인용 2 해석 후보 (미검증): 반대로 **로그·telemetry 경로에는 어떤 브라우저 기본 방어도 없다.** fixture 밀도를 그쪽에 몰아야 한다.
|
|
- 추가로 봐야 할 동일 출처 페이지: `Referer` 헤더, `Request.referrerPolicy`
|
|
|
|
## 관련
|
|
|
|
- 같은 주제 다른 official-doc: `[[raw/official-docs/owasp-content-security-policy-cheat-sheet]]`, `[[raw/official-docs/mdn-http-range-fetch-transfer]]`
|
|
- 이 자료를 인용한 wiki 요약: 생성 전
|