forked from orbit-oss/flask
docs: `Flask-Uploads, X-Forwarded-Host`
This commit is contained in:
parent
06d9a5e738
commit
17eee81da0
5 changed files with 9 additions and 9 deletions
|
|
@ -104,8 +104,8 @@ localhost at port 8000, setting appropriate headers:
|
|||
}
|
||||
|
||||
If your httpd is not providing these headers, the most common setup invokes the
|
||||
host being set from `X-Forwarded-Host` and the remote address from
|
||||
`X-Forwarded-For`::
|
||||
host being set from ``X-Forwarded-Host`` and the remote address from
|
||||
``X-Forwarded-For``::
|
||||
|
||||
from werkzeug.contrib.fixers import ProxyFix
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ Dispatch by Path
|
|||
----------------
|
||||
|
||||
Dispatching by a path on the URL is very similar. Instead of looking at
|
||||
the `Host` header to figure out the subdomain one simply looks at the
|
||||
the ``Host`` header to figure out the subdomain one simply looks at the
|
||||
request path up to the first slash::
|
||||
|
||||
from threading import Lock
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ An Easier Solution
|
|||
|
||||
Because the common pattern for file uploads exists almost unchanged in all
|
||||
applications dealing with uploads, there is a Flask extension called
|
||||
`Flask-Uploads`_ that implements a full fledged upload mechanism with
|
||||
``Flask-Uploads``_ that implements a full fledged upload mechanism with
|
||||
white and blacklisting of extensions and more.
|
||||
|
||||
.. _Flask-Uploads: http://pythonhosted.org/Flask-Uploads/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue