Add .well-known/password-change (#39613)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-09-03 18:13:33 +02:00
1 parent 4ebcbadfc2
commit fbbfd46fb8
3 files changed
+15 -2

No files matched your search

+2 -2
View File
@@ -345,7 +345,7 @@ class HomeAssistantHTTP:
view.register(self.app, self.app.router)
def register_redirect(self, url, redirect_to):
def register_redirect(self, url, redirect_to, *, redirect_exc=HTTPMovedPermanently):
"""Register a redirect with the server.
If given this must be either a string or callable. In case of a
@@ -357,7 +357,7 @@ class HomeAssistantHTTP:
async def redirect(request):
"""Redirect to location."""
raise HTTPMovedPermanently(redirect_to)
raise redirect_exc(redirect_to)
self.app.router.add_route("GET", url, redirect)