Compare commits

...

4 Commits

Author SHA1 Message Date
Ranveer Verma 77c36aa85a
Merge 676aa43430 into 85c5d93cbd 2025-06-17 16:06:10 +02:00
David Lord 85c5d93cbd
Merge branch 'stable'
pre-commit / main (push) Has been cancelled Details
Lock inactive closed issues / lock (push) Has been cancelled Details
2025-06-12 13:48:07 -07:00
David Lord 85cc710464
svg logo
pre-commit / main (push) Has been cancelled Details
2025-06-12 13:46:49 -07:00
Rajveer Verma 676aa43430 docs: add warning and best practices for url_for(..., _external=True) (closes #5718) 2025-04-27 13:25:38 +05:30
9 changed files with 72 additions and 52 deletions

View File

@ -1,4 +1,4 @@
<div align="center"><img src="https://raw.githubusercontent.com/pallets/flask/refs/heads/stable/docs/_static/flask-horizontal.svg" alt="" height="150"></div>
<div align="center"><img src="https://raw.githubusercontent.com/pallets/flask/refs/heads/stable/docs/_static/flask-name.svg" alt="" height="150"></div>
# Flask

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 460 170" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Name">
<path d="M259.452,62.225l-26.466,-0c-3.093,-0 -5.254,0.597 -6.485,1.792c-1.23,1.195 -1.845,3.269 -1.845,6.221l0,10.439l27.52,-0l-1.054,13.075l-26.466,-0l0,30.472l-14.656,-0l-0,-59.785c-0,-5.553 1.213,-9.49 3.638,-11.809c2.425,-2.32 6.59,-3.48 12.494,-3.48l33.32,0l-0,13.075Z" style="fill-rule:nonzero;"/>
<path d="M284.336,124.224l-13.708,0.105l0,-79.396l13.708,-0l-0,79.291Z" style="fill-rule:nonzero;"/>
<path d="M340.536,124.224l-9.174,-0l-4.217,-7.275l-14.657,7.908c-8.154,-0 -13.637,-2.953 -16.448,-8.857c-1.406,-2.882 -2.373,-5.993 -2.9,-9.332c-0.527,-3.339 -0.791,-6.818 -0.791,-10.439c0,-3.62 0.035,-6.291 0.106,-8.013c0.07,-1.722 0.246,-3.726 0.527,-6.01c0.281,-2.285 0.685,-4.2 1.212,-5.747c0.528,-1.546 1.283,-3.145 2.267,-4.797c0.985,-1.652 2.18,-2.97 3.585,-3.954c3.164,-2.179 7.276,-3.269 12.337,-3.269l14.445,0l13.708,-0.843l-0,60.628Zm-13.708,-19.19l0,-28.258l-10.438,-0c-3.866,-0 -6.555,1.476 -8.067,4.428c-1.511,2.952 -2.266,7.363 -2.266,13.233c-0,5.869 0.72,9.999 2.161,12.389c1.441,2.39 4.165,3.585 8.172,3.585l10.438,-5.377Z" style="fill-rule:nonzero;"/>
<path d="M396.736,107.564l-0,1.582c-0.422,5.272 -2.654,9.244 -6.696,11.915c-4.042,2.671 -9.085,4.006 -15.131,4.006c-8.927,0 -15.183,-1.616 -18.768,-4.85c-3.304,-2.952 -4.956,-7.31 -4.956,-13.074l0,-1.266l12.442,0c0,3.234 0.844,5.448 2.531,6.643c1.687,1.195 4.604,1.793 8.751,1.793c5.624,-0 8.436,-2.039 8.436,-6.116c-0,-3.374 -0.985,-5.624 -2.953,-6.748c-0.914,-0.563 -2.073,-0.984 -3.479,-1.266l-10.65,-1.792c-9.279,-1.476 -13.918,-7.275 -13.918,-17.398c0,-5.623 2.056,-9.999 6.168,-13.127c4.112,-3.128 9.332,-4.692 15.658,-4.692c14.41,-0 21.616,6.221 21.616,18.663l-0,1.371l-11.915,-0c-0.141,-3.304 -1.019,-5.554 -2.636,-6.749c-1.617,-1.195 -3.884,-1.792 -6.801,-1.792c-2.917,-0 -5.114,0.58 -6.59,1.74c-1.476,1.159 -2.214,2.442 -2.214,3.848c-0,4.007 1.616,6.291 4.85,6.854l12.758,2.32c8.998,1.687 13.497,7.732 13.497,18.135Z" style="fill-rule:nonzero;"/>
<path d="M460,124.224l-16.449,-0l-15.816,-21.299l-6.01,8.541l0,12.758l-13.707,-0l-0,-79.291l13.707,-0l0,50.084l19.19,-28.575l15.5,0l-19.717,26.993l23.302,30.789Z" style="fill-rule:nonzero;"/>
</g>
<g id="Icon">
<path id="Box" d="M170,17l-0,136c-0,9.383 -7.617,17 -17,17l-136,0c-9.383,0 -17,-7.617 -17,-17l-0,-136c-0,-9.383 7.617,-17 17,-17l136,0c9.383,0 17,7.617 17,17Z" style="fill:url(#_Linear1);"/>
<path id="Shadow" d="M170,125.885l-0,27.115c-0,9.383 -7.617,17 -17,17l-30.65,0l-53.676,-53.677c1.347,1.222 2.759,2.399 4.238,3.518c4.078,3.085 8.663,5.727 13.804,7.661c0.662,0.249 1.333,0.487 2.014,0.712c3.128,1.037 6.455,1.816 9.992,2.28c10.673,1.399 23.249,-0.075 37.999,-6.016l0.115,0.587c0.102,0.657 0.893,1.352 1.964,0.931l3.439,-1.34c1.18,-0.446 1.186,-1.352 1.014,-1.939l4.427,-1.728c0.497,-0.192 2.041,-1.385 0.714,-3.26l-0.012,-0l-2.724,-4.159c-0.409,-0.453 -1.04,-0.625 -1.595,-0.402l-3.496,1.346c-0.414,-0.459 -1.014,-0.632 -1.601,-0.402c-1.142,0.447 -2.29,0.899 -3.432,1.346c-0.37,0.14 -0.472,0.415 -0.402,0.772l0.224,1.091c-6.443,0.695 -17.332,0.35 -27.086,-7.311c-4.312,-3.381 -8.356,-8.165 -11.731,-14.856l-32.004,16.31l-4.337,-4.337c1.644,-0.838 3.288,-1.675 4.932,-2.513c1.703,-0.867 3.406,-1.735 5.109,-2.603c7.972,-4.061 15.945,-8.123 23.915,-12.184c-0.734,-1.901 -1.448,-3.961 -3.891,-13.179l-36.683,16.416l-4.424,-4.423l40.009,-17.906c-0.574,-5.191 -2.142,-20.097 -2.079,-26.805l-0,-0.006c-0.008,-0.564 -0.047,-0.9 -0.188,-1.141l83.102,83.102Zm-128.821,-52.934c0.484,0.308 1.192,0.326 1.911,0.01l0.281,-0.121c0.236,0.993 0.503,2.034 0.799,3.102l-2.991,-2.991Z" style="fill:#3b808b;"/>
<g id="Icon1" serif:id="Icon">
<path d="M87.086,43.93c-0.013,-0.931 -0.109,-1.244 -0.606,-1.531c-0.472,-0.312 -1.187,-0.319 -1.869,-0.019l-45.929,19.667c-0.683,0.299 -1.327,0.899 -1.671,1.55c-0.345,0.65 -0.383,1.339 -0.115,1.83l3.834,7.043l0.051,0.083c0.414,0.657 1.352,0.829 2.309,0.408l0.281,-0.121c1.199,5.027 3.163,11.316 5.785,15.801l40.009,-17.906c-0.574,-5.193 -2.143,-20.107 -2.079,-26.811l-0,0.006Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M90.263,76.648l-38.53,17.243c2.265,4.293 5.059,8.847 8.465,13.236c11.317,-5.767 22.639,-11.533 33.956,-17.3c-0.734,-1.901 -1.448,-3.961 -3.891,-13.179Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M148.382,117.729l-2.724,-4.159c-0.409,-0.453 -1.04,-0.625 -1.595,-0.402l-3.496,1.346c-0.414,-0.459 -1.014,-0.632 -1.601,-0.402c-1.142,0.447 -2.29,0.899 -3.432,1.346c-0.37,0.14 -0.472,0.415 -0.402,0.772l0.224,1.091c-6.443,0.695 -17.332,0.35 -27.086,-7.311c-4.312,-3.381 -8.356,-8.165 -11.731,-14.856l-32.481,16.553c5.938,6.526 13.395,12.312 22.658,15.795c12.885,4.854 29.305,5.313 50.005,-3.024l0.115,0.587c0.102,0.657 0.893,1.352 1.964,0.931l3.439,-1.34c1.18,-0.446 1.186,-1.352 1.014,-1.939l4.427,-1.728c0.497,-0.192 2.041,-1.385 0.714,-3.26l-0.012,-0Z" style="fill:#fff;fill-rule:nonzero;"/>
</g>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.04095e-14,170,-170,1.04095e-14,90.9806,0)"><stop offset="0" style="stop-color:#bdddeb;stop-opacity:1"/><stop offset="1" style="stop-color:#53a9d1;stop-opacity:1"/></linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -6,8 +6,10 @@
<rect x="0" y="0" width="500" height="500"/>
</clipPath>
<g clip-path="url(#_clip1)">
<path d="M224.446,59.975c-0.056,-4.151 -0.483,-5.543 -2.7,-6.823c-2.104,-1.393 -5.288,-1.421 -8.329,-0.085l-204.674,87.64c-3.042,1.336 -5.913,4.008 -7.448,6.908c-1.535,2.899 -1.705,5.97 -0.511,8.158l17.084,31.384l0.228,0.369c1.847,2.928 6.026,3.696 10.29,1.82l1.251,-0.54c5.344,22.4 14.1,50.429 25.783,70.413l178.294,-79.794c-2.559,-23.14 -9.552,-89.602 -9.268,-119.479l0,0.029Z" style="fill:#3babc3;fill-rule:nonzero;"/>
<path d="M238.603,205.776l-171.698,76.838c10.091,19.132 22.542,39.428 37.722,58.986c50.429,-25.698 100.887,-51.396 151.316,-77.094c-3.269,-8.471 -6.452,-17.653 -17.34,-58.73Z" style="fill:#3babc3;fill-rule:nonzero;"/>
<path d="M497.601,388.846l-12.139,-18.535c-1.819,-2.018 -4.633,-2.786 -7.106,-1.791l-15.578,5.999c-1.848,-2.047 -4.52,-2.815 -7.135,-1.791c-5.089,1.99 -10.206,4.008 -15.294,5.998c-1.649,0.625 -2.104,1.847 -1.791,3.439l0.995,4.861c-28.711,3.099 -77.236,1.564 -120.701,-32.577c-19.216,-15.066 -37.239,-36.386 -52.277,-66.206l-144.75,73.768c26.466,29.08 59.697,54.864 100.973,70.385c57.422,21.633 130.593,23.679 222.838,-13.475l0.512,2.616c0.455,2.928 3.98,6.026 8.755,4.15l15.323,-5.97c5.258,-1.99 5.287,-6.026 4.519,-8.641l19.729,-7.704c2.217,-0.853 9.096,-6.169 3.183,-14.526l-0.056,-0Z" style="fill:#3babc3;fill-rule:nonzero;"/>
<g>
<path d="M224.446,59.975c-0.056,-4.151 -0.483,-5.543 -2.7,-6.823c-2.104,-1.393 -5.288,-1.421 -8.329,-0.085l-204.674,87.64c-3.042,1.336 -5.913,4.008 -7.448,6.908c-1.535,2.899 -1.705,5.97 -0.511,8.158l17.084,31.384l0.228,0.369c1.847,2.928 6.026,3.696 10.29,1.82l1.251,-0.54c5.344,22.4 14.1,50.429 25.783,70.413l178.294,-79.794c-2.559,-23.14 -9.552,-89.602 -9.268,-119.479l0,0.029Z" style="fill:#3babc3;fill-rule:nonzero;"/>
<path d="M238.603,205.776l-171.698,76.838c10.091,19.132 22.542,39.428 37.722,58.986c50.429,-25.698 100.887,-51.396 151.316,-77.094c-3.269,-8.471 -6.452,-17.653 -17.34,-58.73Z" style="fill:#3babc3;fill-rule:nonzero;"/>
<path d="M497.601,388.846l-12.139,-18.535c-1.819,-2.018 -4.633,-2.786 -7.106,-1.791l-15.578,5.999c-1.848,-2.047 -4.52,-2.815 -7.135,-1.791c-5.089,1.99 -10.206,4.008 -15.294,5.998c-1.649,0.625 -2.104,1.847 -1.791,3.439l0.995,4.861c-28.711,3.099 -77.236,1.564 -120.701,-32.577c-19.216,-15.066 -37.239,-36.386 -52.277,-66.206l-144.75,73.768c26.466,29.08 59.697,54.864 100.973,70.385c57.422,21.633 130.593,23.679 222.838,-13.475l0.512,2.616c0.455,2.928 3.98,6.026 8.755,4.15l15.323,-5.97c5.258,-1.99 5.287,-6.026 4.519,-8.641l19.729,-7.704c2.217,-0.853 9.096,-6.169 3.183,-14.526l-0.056,-0Z" style="fill:#3babc3;fill-rule:nonzero;"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

17
docs/_static/flask-logo.svg vendored Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 500 500" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<rect id="Logo" x="0" y="0" width="500" height="500" style="fill:none;"/>
<g>
<path id="Box" d="M500,50l0,400c0,27.596 -22.404,50 -50,50l-400,0c-27.596,0 -50,-22.404 -50,-50l0,-400c0,-27.596 22.404,-50 50,-50l400,0c27.596,0 50,22.404 50,50Z" style="fill:url(#_Linear1);"/>
<path id="Shadow" d="M500,398.646l0,51.354c0,27.596 -22.404,50 -50,50l-94.111,0l-170.452,-170.451c13.541,12.279 29.511,22.845 48.242,29.888c34.453,12.98 78.356,14.208 133.703,-8.084l0.307,1.569c0.273,1.757 2.388,3.616 5.253,2.49l9.193,-3.582c3.156,-1.194 3.173,-3.616 2.712,-5.185l11.837,-4.622c1.331,-0.512 5.458,-3.701 1.91,-8.716l-0.034,0l-7.283,-11.12c-1.091,-1.211 -2.78,-1.672 -4.264,-1.075l-9.346,3.599c-1.109,-1.228 -2.712,-1.688 -4.281,-1.074c-3.054,1.194 -6.124,2.404 -9.177,3.598c-0.989,0.376 -1.262,1.109 -1.074,2.064l0.597,2.917c-17.227,1.859 -46.342,0.938 -72.421,-19.547c-11.53,-9.039 -22.343,-21.831 -31.366,-39.723l-83.923,42.769l-13.246,-10.755c30.258,-15.419 60.532,-30.837 90.79,-46.256c-1.961,-5.083 -3.872,-10.592 -10.404,-35.238l-98.082,43.893l-11.828,-11.828l106.976,-47.876c-1.534,-13.88 -5.728,-53.736 -5.56,-71.67l-0,-0.017c-0.027,-1.894 -0.184,-2.827 -0.85,-3.504l266.182,266.182Zm-388.562,-185.436c1.272,1.164 3.414,1.356 5.594,0.397l0.75,-0.324c0.645,2.703 1.373,5.543 2.181,8.452l-8.525,-8.525Z" style="fill:#3b808b;"/>
<g id="Icon">
<path d="M234.668,135.985c-0.034,-2.49 -0.29,-3.326 -1.62,-4.094c-1.263,-0.835 -3.173,-0.852 -4.998,-0.051l-122.804,52.584c-1.825,0.802 -3.548,2.405 -4.469,4.145c-0.921,1.74 -1.023,3.582 -0.307,4.895l10.251,18.83l0.136,0.222c1.109,1.757 3.616,2.217 6.175,1.091l0.75,-0.324c3.207,13.441 8.46,30.258 15.47,42.248l106.976,-47.876c-1.535,-13.884 -5.731,-53.761 -5.56,-71.687l-0,0.017Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M243.162,223.466l-103.019,46.103c6.055,11.478 13.525,23.656 22.633,35.391c30.258,-15.419 60.532,-30.837 90.79,-46.256c-1.961,-5.083 -3.872,-10.592 -10.404,-35.238Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M398.56,333.307l-7.283,-11.12c-1.091,-1.211 -2.78,-1.672 -4.264,-1.075l-9.346,3.599c-1.109,-1.228 -2.712,-1.688 -4.281,-1.074c-3.054,1.194 -6.124,2.404 -9.177,3.598c-0.989,0.376 -1.262,1.109 -1.074,2.064l0.597,2.917c-17.227,1.859 -46.342,0.938 -72.421,-19.547c-11.53,-9.039 -22.343,-21.831 -31.366,-39.723l-86.85,44.26c15.879,17.449 35.818,32.919 60.584,42.231c34.453,12.98 78.356,14.208 133.703,-8.084l0.307,1.569c0.273,1.757 2.388,3.616 5.253,2.49l9.193,-3.582c3.156,-1.194 3.173,-3.616 2.712,-5.185l11.837,-4.622c1.331,-0.512 5.458,-3.701 1.91,-8.716l-0.034,0Z" style="fill:#fff;fill-rule:nonzero;"/>
</g>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(3.06162e-14,500,-500,3.06162e-14,267.59,0)"><stop offset="0" style="stop-color:#bdddeb;stop-opacity:1"/><stop offset="1" style="stop-color:#53a9d1;stop-opacity:1"/></linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

23
docs/_static/flask-name.svg vendored Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 706 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g>
<path id="Name" d="M420.35,117.6l-37.65,-0c-4.4,-0 -7.475,0.85 -9.225,2.55c-1.75,1.7 -2.625,4.65 -2.625,8.85l-0,14.85l39.15,-0l-1.5,18.6l-37.65,-0l-0,43.35l-20.85,-0l-0,-85.05c-0,-7.9 1.725,-13.5 5.175,-16.8c3.45,-3.3 9.375,-4.95 17.775,-4.95l47.4,-0l0,18.6Z" style="fill-rule:nonzero;"/>
<path d="M455.75,205.8l-19.5,0.15l-0,-112.95l19.5,-0l-0,112.8Z" style="fill-rule:nonzero;"/>
<path d="M535.7,205.8l-13.05,-0l-6,-10.35l-20.85,11.25c-11.6,-0 -19.4,-4.2 -23.4,-12.6c-2,-4.1 -3.375,-8.525 -4.125,-13.275c-0.75,-4.75 -1.125,-9.7 -1.125,-14.85c-0,-5.15 0.05,-8.95 0.15,-11.4c0.1,-2.45 0.35,-5.3 0.75,-8.55c0.4,-3.25 0.975,-5.975 1.725,-8.175c0.75,-2.2 1.825,-4.475 3.225,-6.825c1.4,-2.35 3.1,-4.225 5.1,-5.625c4.5,-3.1 10.35,-4.65 17.55,-4.65l20.55,-0l19.5,-1.2l-0,86.25Zm-19.5,-27.3l-0,-40.2l-14.85,-0c-5.5,-0 -9.325,2.1 -11.475,6.3c-2.15,4.2 -3.225,10.475 -3.225,18.825c-0,8.35 1.025,14.225 3.075,17.625c2.05,3.4 5.925,5.1 11.625,5.1l14.85,-7.65Z" style="fill-rule:nonzero;"/>
<path d="M615.65,182.1l0,2.25c-0.6,7.5 -3.775,13.15 -9.525,16.95c-5.75,3.8 -12.925,5.7 -21.525,5.7c-12.7,-0 -21.6,-2.3 -26.7,-6.9c-4.7,-4.2 -7.05,-10.4 -7.05,-18.6l0,-1.8l17.7,0c0,4.6 1.2,7.75 3.6,9.45c2.4,1.7 6.55,2.55 12.45,2.55c8,0 12,-2.9 12,-8.7c0,-4.8 -1.4,-8 -4.2,-9.6c-1.3,-0.8 -2.95,-1.4 -4.95,-1.8l-15.15,-2.55c-13.2,-2.1 -19.8,-10.35 -19.8,-24.75c0,-8 2.925,-14.225 8.775,-18.675c5.85,-4.45 13.275,-6.675 22.275,-6.675c20.5,0 30.75,8.85 30.75,26.55l0,1.95l-16.95,0c-0.2,-4.7 -1.45,-7.9 -3.75,-9.6c-2.3,-1.7 -5.525,-2.55 -9.675,-2.55c-4.15,0 -7.275,0.825 -9.375,2.475c-2.1,1.65 -3.15,3.475 -3.15,5.475c0,5.7 2.3,8.95 6.9,9.75l18.15,3.3c12.8,2.4 19.2,11 19.2,25.8Z" style="fill-rule:nonzero;"/>
<path d="M705.65,205.8l-23.4,-0l-22.5,-30.3l-8.55,12.15l0,18.15l-19.5,-0l0,-112.8l19.5,-0l0,71.25l27.3,-40.65l22.05,-0l-28.05,38.4l33.15,43.8Z" style="fill-rule:nonzero;"/>
<g id="Logo">
<path id="Box" d="M300,30l0,240c0,16.557 -13.443,30 -30,30l-240,-0c-16.557,-0 -30,-13.443 -30,-30l0,-240c0,-16.557 13.443,-30 30,-30l240,0c16.557,0 30,13.443 30,30Z" style="fill:url(#_Linear1);"/>
<path id="Shadow" d="M300,239.188l0,30.812c0,16.557 -13.443,30 -30,30l-56.467,-0l-102.271,-102.271c8.125,7.368 17.707,13.707 28.945,17.933c20.672,7.788 47.014,8.525 80.222,-4.85l0.184,0.941c0.164,1.054 1.433,2.17 3.152,1.494l5.516,-2.149c1.893,-0.716 1.904,-2.169 1.627,-3.111l7.103,-2.773c0.798,-0.307 3.274,-2.221 1.146,-5.23l-0.021,0l-4.37,-6.672c-0.655,-0.727 -1.668,-1.003 -2.558,-0.645l-5.608,2.16c-0.665,-0.737 -1.627,-1.013 -2.569,-0.645c-1.832,0.716 -3.674,1.443 -5.505,2.159c-0.594,0.225 -0.758,0.665 -0.645,1.239l0.358,1.749c-10.336,1.116 -27.805,0.563 -43.452,-11.727c-6.918,-5.424 -13.406,-13.099 -18.82,-23.835l-50.354,25.662l-7.947,-6.453c18.154,-9.251 36.319,-18.502 54.474,-27.754c-1.177,-3.049 -2.323,-6.355 -6.243,-21.143l-58.849,26.336l-7.097,-7.096l64.186,-28.726c-0.921,-8.328 -3.437,-32.242 -3.336,-43.002l-0,-0.01c-0.016,-1.137 -0.111,-1.697 -0.51,-2.103l159.709,159.71Zm-233.137,-111.262c0.763,0.699 2.048,0.814 3.356,0.238l0.45,-0.194c0.387,1.622 0.824,3.325 1.309,5.071l-5.115,-5.115Z" style="fill:#3b808b;"/>
<g id="Icon">
<path d="M140.801,81.591c-0.021,-1.494 -0.174,-1.996 -0.972,-2.456c-0.758,-0.502 -1.904,-0.512 -2.999,-0.031l-73.683,31.551c-1.095,0.481 -2.128,1.443 -2.681,2.486c-0.552,1.044 -0.614,2.149 -0.184,2.937l6.151,11.298l0.081,0.133c0.666,1.055 2.17,1.331 3.705,0.655l0.45,-0.194c1.924,8.064 5.076,18.155 9.282,25.349l64.186,-28.726c-0.921,-8.33 -3.439,-32.257 -3.336,-43.012l-0,0.01Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M145.897,134.079l-61.811,27.662c3.633,6.887 8.115,14.194 13.58,21.235c18.154,-9.251 36.319,-18.502 54.474,-27.754c-1.177,-3.049 -2.323,-6.355 -6.243,-21.143Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M239.136,199.984l-4.37,-6.672c-0.655,-0.727 -1.668,-1.003 -2.558,-0.645l-5.608,2.16c-0.665,-0.737 -1.627,-1.013 -2.569,-0.645c-1.832,0.716 -3.674,1.443 -5.505,2.159c-0.594,0.225 -0.758,0.665 -0.645,1.239l0.358,1.749c-10.336,1.116 -27.805,0.563 -43.452,-11.727c-6.918,-5.424 -13.406,-13.099 -18.82,-23.835l-52.11,26.557c9.528,10.469 21.491,19.751 36.35,25.338c20.672,7.788 47.014,8.525 80.222,-4.85l0.184,0.941c0.164,1.054 1.433,2.17 3.152,1.494l5.516,-2.149c1.893,-0.716 1.904,-2.169 1.627,-3.111l7.103,-2.773c0.798,-0.307 3.274,-2.221 1.146,-5.23l-0.021,0Z" style="fill:#fff;fill-rule:nonzero;"/>
</g>
</g>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.83697e-14,300,-300,1.83697e-14,160.554,0)"><stop offset="0" style="stop-color:#bdddeb;stop-opacity:1"/><stop offset="1" style="stop-color:#53a9d1;stop-opacity:1"/></linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 250 371" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Name">
<path d="M49.452,307.292l-26.466,0c-3.093,0 -5.254,0.598 -6.485,1.793c-1.23,1.195 -1.845,3.268 -1.845,6.221l0,10.438l27.52,0l-1.054,13.075l-26.466,0l0,30.472l-14.656,0l0,-59.784c0,-5.554 1.213,-9.49 3.638,-11.81c2.425,-2.32 6.59,-3.479 12.494,-3.479l33.32,-0l-0,13.074Z" style="fill-rule:nonzero;"/>
<path d="M74.336,369.291l-13.708,0.106l0,-79.397l13.708,0l-0,79.291Z" style="fill-rule:nonzero;"/>
<path d="M130.536,369.291l-9.174,0l-4.217,-7.275l-14.657,7.908c-8.154,0 -13.637,-2.952 -16.448,-8.857c-1.406,-2.882 -2.373,-5.992 -2.9,-9.331c-0.527,-3.339 -0.791,-6.819 -0.791,-10.439c0,-3.62 0.035,-6.291 0.106,-8.014c0.07,-1.722 0.246,-3.725 0.527,-6.01c0.281,-2.284 0.685,-4.2 1.212,-5.746c0.528,-1.547 1.283,-3.146 2.267,-4.798c0.985,-1.652 2.18,-2.97 3.585,-3.954c3.164,-2.179 7.276,-3.268 12.337,-3.268l14.445,-0l13.708,-0.844l-0,60.628Zm-13.708,-19.19l0,-28.258l-10.438,0c-3.866,0 -6.555,1.476 -8.067,4.429c-1.511,2.952 -2.266,7.363 -2.266,13.232c-0,5.87 0.72,10 2.161,12.39c1.441,2.39 4.165,3.585 8.172,3.585l10.438,-5.378Z" style="fill-rule:nonzero;"/>
<path d="M186.736,352.632l-0,1.581c-0.422,5.272 -2.654,9.244 -6.696,11.915c-4.042,2.671 -9.085,4.007 -15.131,4.007c-8.927,-0 -15.183,-1.617 -18.768,-4.85c-3.304,-2.953 -4.956,-7.311 -4.956,-13.075l0,-1.265l12.442,-0c0,3.233 0.844,5.448 2.531,6.643c1.687,1.195 4.604,1.792 8.751,1.792c5.624,0 8.436,-2.039 8.436,-6.116c-0,-3.374 -0.985,-5.623 -2.953,-6.748c-0.914,-0.562 -2.073,-0.984 -3.479,-1.265l-10.65,-1.793c-9.279,-1.476 -13.918,-7.275 -13.918,-17.397c0,-5.624 2.056,-10 6.168,-13.128c4.112,-3.128 9.332,-4.692 15.658,-4.692c14.41,0 21.616,6.221 21.616,18.663l-0,1.371l-11.915,-0c-0.141,-3.304 -1.019,-5.553 -2.636,-6.748c-1.617,-1.195 -3.884,-1.793 -6.801,-1.793c-2.917,0 -5.114,0.58 -6.59,1.74c-1.476,1.16 -2.214,2.443 -2.214,3.849c-0,4.006 1.616,6.291 4.85,6.853l12.758,2.32c8.998,1.687 13.497,7.732 13.497,18.136Z" style="fill-rule:nonzero;"/>
<path d="M250,369.291l-16.449,0l-15.816,-21.299l-6.01,8.541l0,12.758l-13.707,0l-0,-79.291l13.707,0l0,50.084l19.19,-28.574l15.5,-0l-19.717,26.993l23.302,30.788Z" style="fill-rule:nonzero;"/>
</g>
<g id="Icon">
<path id="Box" d="M250,25l-0,200c-0,13.798 -11.202,25 -25,25l-200,-0c-13.798,-0 -25,-11.202 -25,-25l0,-200c0,-13.798 11.202,-25 25,-25l200,0c13.798,0 25,11.202 25,25Z" style="fill:url(#_Linear1);"/>
<path id="Shadow" d="M250,185.125l-0,39.875c-0,13.798 -11.202,25 -25,25l-45.073,-0l-78.936,-78.937c1.982,1.798 4.058,3.528 6.233,5.174c5.997,4.536 12.739,8.422 20.299,11.265c0.974,0.367 1.961,0.717 2.962,1.048c4.6,1.525 9.493,2.671 14.694,3.353c15.696,2.058 34.19,-0.111 55.881,-8.847l0.169,0.863c0.15,0.966 1.313,1.989 2.889,1.369l5.056,-1.97c1.736,-0.656 1.745,-1.988 1.492,-2.851l6.51,-2.543c0.732,-0.281 3.002,-2.035 1.051,-4.793l-0.019,-0l-4.005,-6.117c-0.601,-0.666 -1.53,-0.919 -2.346,-0.591l-5.14,1.98c-0.61,-0.676 -1.492,-0.929 -2.355,-0.591c-1.679,0.656 -3.368,1.322 -5.047,1.979c-0.544,0.207 -0.694,0.61 -0.591,1.135l0.328,1.604c-9.474,1.023 -25.487,0.516 -39.831,-10.75c-6.341,-4.972 -12.289,-12.008 -17.251,-21.848l-47.065,23.985l-6.378,-6.377c2.417,-1.232 4.835,-2.464 7.252,-3.696c2.504,-1.276 5.009,-2.552 7.514,-3.828c11.723,-5.972 23.448,-11.945 35.168,-17.917c-1.078,-2.796 -2.129,-5.826 -5.722,-19.381l-53.945,24.141l-6.505,-6.505l58.836,-26.332c-0.844,-7.634 -3.15,-29.555 -3.058,-39.419l0,-0.009c-0.011,-0.829 -0.069,-1.323 -0.276,-1.678l122.209,122.209Zm-189.443,-77.844c0.712,0.453 1.753,0.48 2.81,0.015l0.413,-0.179c0.348,1.46 0.741,2.992 1.175,4.562l-4.398,-4.398Z" style="fill:#3b808b;"/>
<g id="Icon1" serif:id="Icon">
<path d="M128.067,64.603c-0.018,-1.369 -0.159,-1.829 -0.891,-2.251c-0.694,-0.46 -1.745,-0.469 -2.748,-0.028l-67.543,28.921c-1.004,0.441 -1.951,1.323 -2.458,2.28c-0.506,0.956 -0.562,1.97 -0.168,2.692l5.637,10.356l0.076,0.122c0.609,0.967 1.988,1.22 3.395,0.601l0.413,-0.179c1.764,7.393 4.653,16.642 8.509,23.237l58.836,-26.332c-0.844,-7.636 -3.151,-29.569 -3.058,-39.428l0,0.009Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M132.739,112.718l-56.661,25.356c3.331,6.314 7.44,13.012 12.449,19.466c16.642,-8.481 33.293,-16.961 49.934,-25.441c-1.078,-2.796 -2.129,-5.826 -5.722,-19.381Z" style="fill:#fff;fill-rule:nonzero;"/>
<path d="M218.208,173.131l-4.005,-6.117c-0.601,-0.666 -1.53,-0.919 -2.346,-0.591l-5.14,1.98c-0.61,-0.676 -1.492,-0.929 -2.355,-0.591c-1.679,0.656 -3.368,1.322 -5.047,1.979c-0.544,0.207 -0.694,0.61 -0.591,1.135l0.328,1.604c-9.474,1.023 -25.487,0.516 -39.831,-10.75c-6.341,-4.972 -12.289,-12.008 -17.251,-21.848l-47.768,24.343c8.734,9.597 19.7,18.105 33.321,23.227c18.95,7.139 43.096,7.815 73.537,-4.446l0.169,0.863c0.15,0.966 1.313,1.989 2.889,1.369l5.056,-1.97c1.736,-0.656 1.745,-1.988 1.492,-2.851l6.51,-2.543c0.732,-0.281 3.002,-2.035 1.051,-4.793l-0.019,-0Z" style="fill:#fff;fill-rule:nonzero;"/>
</g>
</g>
<defs>
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.53081e-14,250,-250,1.53081e-14,133.795,0)"><stop offset="0" style="stop-color:#bdddeb;stop-opacity:1"/><stop offset="1" style="stop-color:#53a9d1;stop-opacity:1"/></linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -59,7 +59,7 @@ html_sidebars = {
singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]}
html_static_path = ["_static"]
html_favicon = "_static/flask-icon.svg"
html_logo = "_static/flask-vertical.svg"
html_logo = "_static/flask-logo.svg"
html_title = f"Flask Documentation ({version})"
html_show_sourcelink = False

View File

@ -3,7 +3,7 @@
Welcome to Flask
================
.. image:: _static/flask-horizontal.svg
.. image:: _static/flask-name.svg
:align: center
:height: 200px

View File

@ -9,6 +9,30 @@ will depend on each application's specific needs and threat model. Many hosting
platforms may take care of certain types of problems without the need for the
Flask application to handle them.
Host Header Injection and External URLs
---------------------------------------
When generating external URLs using :func:`url_for` with the ``_external=True`` argument,
Flask constructs the URL using the requeust's ``Host`` header by default. If your application
does not explicitly set the :data:`SERVER_NAME` configuration or use :data:`trusted_hosts`,
this can make your app vulnerable to host header injection attacks. This is especially
critical when generating links for password resets or other sensitive actions that may be
sent to users.
.. warning::
**Host Header Injection Risk:** If an attacker can control the ``Host`` header in a request,
they may be able to generate links pointing to malicious domains. This is a risk when
using ``url_for(..., _external=True)`` without proper configuration.
**Best Practices:**
- Always set :data:`SERVER_NAME` in your configuration for production deployments.
- Consider using :data:`trusted_hosts` to restrict which hosts are accepted.
- Review the :doc:`/deploying/proxy_fix` documentation for more details on handling proxies and headers securely.
For more information, see :issue:`5718`.
Resource Use
------------