Files
progcode/web/public/assets/editorial/2020/reverse-proxy-header-boundary-2020.svg
T
huncode b1e9aae0c2
Build and deploy / deploy (push) Successful in 13s
revise April 2020 proxy articles
2026-07-31 11:22:40 +03:00

48 lines
4.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="1280" viewBox="0 0 720 1280" role="img" aria-labelledby="title desc">
<title id="title">Граница заголовков между клиентом, Nginx и приложением</title>
<desc id="desc">Вертикальная схема показывает, что входные клиентские заголовки не считаются достоверными сами по себе, Nginx формирует согласованный набор полей, а приложение читает только те поля, источник которых определён.</desc>
<defs>
<linearGradient id="bg" x1="0" x2="0" y1="0" y2="1">
<stop offset="0" stop-color="#fff8ee"/>
<stop offset="1" stop-color="#f2f5ff"/>
</linearGradient>
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
<path d="M0,0 L12,6 L0,12 Z" fill="#835121"/>
</marker>
</defs>
<rect width="720" height="1280" rx="32" fill="url(#bg)"/>
<text x="48" y="66" fill="#3d2b19" font-family="Arial, sans-serif" font-size="34" font-weight="700">Header без источника — не факт</text>
<text x="48" y="104" fill="#725d49" font-family="Arial, sans-serif" font-size="22">Сначала договор, затем чтение в приложении</text>
<rect x="48" y="146" width="624" height="210" rx="22" fill="#ffffff" stroke="#d6a96d" stroke-width="3"/>
<text x="82" y="198" fill="#3d2b19" font-family="Arial, sans-serif" font-size="29" font-weight="700">Внешний запрос</text>
<text x="82" y="236" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">Host • Cookie • X-Forwarded-* • тело</text>
<text x="82" y="274" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">Клиент может прислать любой header</text>
<rect x="82" y="296" width="402" height="38" rx="12" fill="#fff0dc"/>
<text x="102" y="322" fill="#8a4c15" font-family="Arial, sans-serif" font-size="20" font-weight="700">Не назначаем доверие здесь</text>
<line x1="360" y1="372" x2="360" y2="436" stroke="#835121" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="48" y="456" width="624" height="298" rx="22" fill="#fff0dc" stroke="#c77c28" stroke-width="3"/>
<text x="82" y="508" fill="#3d2b19" font-family="Arial, sans-serif" font-size="29" font-weight="700">Nginx: формирует договор</text>
<text x="82" y="548" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">Host ← $host</text>
<text x="82" y="584" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">X-Forwarded-For ← proxy policy</text>
<text x="82" y="620" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">X-Forwarded-Proto ← известный hop</text>
<text x="82" y="656" fill="#624e3c" font-family="Arial, sans-serif" font-size="22">realip только с set_real_ip_from</text>
<rect x="82" y="682" width="488" height="44" rx="12" fill="#ffffff"/>
<text x="104" y="712" fill="#8a4c15" font-family="Arial, sans-serif" font-size="21" font-weight="700">Источник и формат названы явно</text>
<line x1="360" y1="770" x2="360" y2="834" stroke="#835121" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="48" y="854" width="624" height="208" rx="22" fill="#ffffff" stroke="#7d8ecb" stroke-width="3"/>
<text x="82" y="906" fill="#263666" font-family="Arial, sans-serif" font-size="29" font-weight="700">Приложение</text>
<text x="82" y="946" fill="#48577f" font-family="Arial, sans-serif" font-size="22">Читает только согласованные поля</text>
<text x="82" y="982" fill="#48577f" font-family="Arial, sans-serif" font-size="22">Не угадывает схему по peer socket</text>
<text x="82" y="1018" fill="#48577f" font-family="Arial, sans-serif" font-size="22">Не доверяет прямому X-Forwarded-For</text>
<line x1="360" y1="1078" x2="360" y2="1132" stroke="#466bb1" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="48" y="1152" width="624" height="80" rx="20" fill="#263666"/>
<text x="82" y="1203" fill="#ffffff" font-family="Arial, sans-serif" font-size="24" font-weight="700">Проверка: один маршрут + proxy/app log</text>
</svg>