mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Make webui login optional.
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -158,8 +158,9 @@ ui.faces.position_y = 34
|
|||||||
|
|
||||||
ui.web.enabled = true
|
ui.web.enabled = true
|
||||||
ui.web.address = "::" # listening on both ipv4 and ipv6 - switch to 0.0.0.0 to listen on just ipv4
|
ui.web.address = "::" # listening on both ipv4 and ipv6 - switch to 0.0.0.0 to listen on just ipv4
|
||||||
ui.web.username = "changeme"
|
ui.web.auth = false
|
||||||
ui.web.password = "changeme"
|
ui.web.username = "changeme" # if auth is true
|
||||||
|
ui.web.password = "changeme" # if auth is true
|
||||||
ui.web.origin = ""
|
ui.web.origin = ""
|
||||||
ui.web.port = 8080
|
ui.web.port = 8080
|
||||||
ui.web.on_frame = ""
|
ui.web.on_frame = ""
|
||||||
|
@ -64,6 +64,9 @@ class Handler:
|
|||||||
def with_auth(self, f):
|
def with_auth(self, f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
if not self._config['auth']:
|
||||||
|
return f(*args, **kwargs)
|
||||||
|
else:
|
||||||
auth = request.authorization
|
auth = request.authorization
|
||||||
if not auth or not auth.username or not auth.password or not self._check_creds(auth.username,
|
if not auth or not auth.username or not auth.password or not self._check_creds(auth.username,
|
||||||
auth.password):
|
auth.password):
|
||||||
|
Reference in New Issue
Block a user