[Баг]:
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- documentation
Research direction
Start at the fetch API article section linked in the issue, especially the referrer/referrerPolicy subsection. Verify the browser default described there against the referenced browser documentation, then update the explanation and example so they match current behavior. Done means the article no longer presents the outdated default as current.
Written by the indexing model from the issue text.
Description
Описание
В статье https://learn.javascript.ru/fetch-api#referrer-referrerpolicy ошибка в том что раньше был другой параметр по-умолчанию no-referrer-when-downgrade https://www.google.com/url?sa=i&source=web&rct=j&url=https://developer.chrome.com/blog/referrer-policy-new-chrome-default%23:~:text%3DUp%2520until%2520recently%252C%2520no%252Dreferrer,larger%2520initiative:%2520the%2520Privacy%2520Sandbox.&ved=2ahUKEwjQ2cH_ybySAxXz4wIHHYmkIL0Q1fkOegYIAQgMEAI&opi=89978449&cd&psig=AOvVaw0Oisvtjz6mNAWVGPKRysDV&ust=1770182545047000
А сейчас strict-origin-when-cross-origin,
Поэтому надо в тексте это упомянуть.
Допустим, у нас есть админка со структурой URL, которая не должна стать известной снаружи сайта.
Если мы отправляем запрос fetch, то по умолчанию он всегда отправляет заголовок Referer с полным URL-адресом нашей админки (исключение – это когда мы делаем запрос от HTTPS в HTTP, в таком случае Referer не будет отправляться).
Например, Referer: https://javascript.info/admin/secret/paths.
Если мы хотим, чтобы другие сайты получали только источник, но не URL-путь, это сделает такая настройка:
fetch('https://another.com/page', {
// ...
referrerPolicy: "origin-when-cross-origin" // Referer: https://javascript.info
});
Как воспроизвести?
Уже описал
Браузер
Любой браузер
- Dominant language
- HTML
- Stars
- 4.1k
- Forks
- 922
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from javascript-tutorial/ru.javascript.info
-
suggestion: tutorial
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
javascript-tutorial/ru.javascript.info#2187 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
javascript-tutorial/ru.javascript.info#2163 · 1 comment ·
-
suggestion: tutorial
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
suggestion: tutorial
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in javascript-tutorial/ru.javascript.info
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100