mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
Dashboard, after login use relative url. (#4103)
This commit is contained in:
parent
6e4267b797
commit
f117d4f50a
1 changed files with 2 additions and 2 deletions
|
@ -842,7 +842,7 @@ PING_REQUEST = threading.Event()
|
||||||
class LoginHandler(BaseHandler):
|
class LoginHandler(BaseHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
if is_authenticated(self):
|
if is_authenticated(self):
|
||||||
self.redirect("/")
|
self.redirect("./")
|
||||||
else:
|
else:
|
||||||
self.render_login_page()
|
self.render_login_page()
|
||||||
|
|
||||||
|
@ -887,7 +887,7 @@ class LoginHandler(BaseHandler):
|
||||||
password = self.get_argument("password", "")
|
password = self.get_argument("password", "")
|
||||||
if settings.check_password(username, password):
|
if settings.check_password(username, password):
|
||||||
self.set_secure_cookie("authenticated", cookie_authenticated_yes)
|
self.set_secure_cookie("authenticated", cookie_authenticated_yes)
|
||||||
self.redirect("/")
|
self.redirect("./")
|
||||||
return
|
return
|
||||||
error_str = (
|
error_str = (
|
||||||
"Invalid username or password" if settings.username else "Invalid password"
|
"Invalid username or password" if settings.username else "Invalid password"
|
||||||
|
|
Loading…
Reference in a new issue