<h3 dir="auto">First Check</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li>
</ul>
<h3 dir="auto">Commit to Help</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li>
</ul>
<h3 dir="auto">Example Code</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# see wanted code"><pre class="notranslate"><span class="pl-c"># see wanted code</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">The http header for the different authentication protocols is currently hardcoded to "Authorization", which on itself is accurate according to the standards ((ex. MDN definition)[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization]). There are, however, reasons in practice you would want to have a different, custom named header.</p>
<p dir="auto">For example, in my case where the FastAPI is hosted behind a proxy which already requires the Authorization header to be set. I would like it to be set in the FastAPI to something else (e.g. like "x-bearer-key" or "foo").</p>
<p dir="auto">Is it possible to define a custom http header name for authorization, instead of the default "Authorization" header name?</p>
<h3 dir="auto">Wanted Solution</h3>
<h1 dir="auto">example code of what would be great</h1>
<p dir="auto">auth_scheme = HTTPBearer(authorization_header='MY-OWN-KEY-INSTEAD-OF-AUTHORIZATION')</p>
<h3 dir="auto">Wanted Code</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# example code of what would be great
auth_scheme = HTTPBearer(authorization_header='MY-OWN-KEY-INSTEAD-OF-AUTHORIZATION')"><pre class="notranslate"><span class="pl-c"># example code of what would be great</span>
<span class="pl-s1">auth_scheme</span> <span class="pl-c1">=</span> <span class="pl-v">HTTPBearer</span>(<span class="pl-s1">authorization_header</span><span class="pl-c1">=</span><span class="pl-s">'MY-OWN-KEY-INSTEAD-OF-AUTHORIZATION'</span>)</pre></div>
<h3 dir="auto">Alternatives</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Linux, Windows, macOS</p>
<h3 dir="auto">Operating System Details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">FastAPI Version</h3>
<p dir="auto">0.74</p>
<h3 dir="auto">Python Version</h3>
<p dir="auto">3.10.x</p>
<h3 dir="auto">Additional Context</h3>
<p dir="auto"><em>No response</em></p>
<p dir="auto">actually there is no issue i contacted mister Sebastián to propose for him an idea about making a CLI for the framework  to create a project structure  and managing our projects so that we developers have  start point that facilitate the hard work of making an architecture to the project therefore stays flexible for  expanding the project and adding more features and  automate the boring stuff like creating CRUD from the ORM that will make the project 1000% time faster than before .<br>
locking dependencies by creating virtual environment add README file for documentation the project etc...</p>
<p dir="auto">i really hope some one help me making this become true because i dont know how to make a good cli but i managed to create something for tornado i called it  " cycloneCLI " for creating my own projects  then i found something called <a href="https://pypi.org/project/torn/" rel="nofollow">torn</a> for tornado framework the problem is its a very very good structure and a starter project template that no one uses it it may be because the framework is starting to die but it helped me a lot to understand my needs better and work on different parts  of my project with more efficiency and good quality code so why we dont make fastapi better . and thank you<br>
.<br>
"med amine fouzai aka John constantine"</p>