SimpleSallap:SimpleMCP:Allow auth check to be bypassed, if needed

By default bearer based auth check is done always whether in https
or http mode. However by updating the sec.bAuthAlways config entry
to false, the bearer auth check will be carried out only in https
mode.
This commit is contained in:
hanishkvc 2025-12-07 02:34:05 +05:30
parent 9d6daaed8c
commit 79cfbbfc8a
2 changed files with 5 additions and 3 deletions

View File

@ -43,6 +43,7 @@ class Sec(DictyDataclassMixin):
certFile: str = ""
keyFile: str = ""
bearerAuth: str = ""
bAuthAlways: bool = True
@dataclass

View File

@ -137,6 +137,7 @@ class ProxyHandler(http.server.BaseHTTPRequestHandler):
"""
print(f"DBUG:PH:Post:{self.address_string()}:{self.path}")
print(f"DBUG:PH:Post:Headers:{self.headers}")
if gMe.op.sslContext or gMe.sec.bAuthAlways:
acGot = self.auth_check()
if not acGot.callOk:
self.send_error(acGot.statusCode, acGot.statusMsg)