mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Dashboard, after login use relative url. (#4103)
This commit is contained in:
parent
bae9a950c0
commit
0a19b1e32c
1 changed files with 2 additions and 2 deletions
|
@ -849,7 +849,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()
|
||||||
|
|
||||||
|
@ -894,7 +894,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