Change Flask.__init__ to accept two new keyword arguments, host_matching and static_host. (#1560)

This enables host_matching to be set properly by the time the constructor adds
the static route, and enables the static route to be properly associated with
the required host.

Previously, you could only enable host_matching once your app was already
instantiated (e.g. app.url_map.host_matching = True), but at that point
the constructor would have already added the static route without host matching
and an associated host, leaving the static route in a broken state.

Fixes #1559.
This commit is contained in:
jab 2017-04-07 10:31:54 -04:00 committed by Markus Unterwaditzer
parent ec18fe9477
commit 00d6e339ec
4 changed files with 46 additions and 7 deletions

View file

@ -14,6 +14,11 @@ Major release, unreleased
- Change default configuration `JSONIFY_PRETTYPRINT_REGULAR=False`. jsonify()
method returns compressed response by default, and pretty response in
debug mode.
- Change Flask.__init__ to accept two new keyword arguments, ``host_matching``
and ``static_host``. This enables ``host_matching`` to be set properly by the
time the constructor adds the static route, and enables the static route to
be properly associated with the required host. (``#1559``)
Version 0.12.1
--------------