From 190472510efa42ae9d33a1c8110279c0ea2d44ef Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Tue, 14 Jan 2025 22:45:10 -0800 Subject: [PATCH] Update static content type handling and disable /networks URL --- proxy/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/server.py b/proxy/server.py index b1539c9..2a3a2ad 100755 --- a/proxy/server.py +++ b/proxy/server.py @@ -92,6 +92,7 @@ DISABLED: Final[Set[str]] = set([ '/api/customer/registration', + '/networks' ]) WEB_ROOT: Final[str] = os.path.join(os.path.dirname(__file__), "web") SERVER_DEBUG: Final[bool] = bool(os.getenv("PW_DEBUG", "no").lower() == "yes") @@ -753,7 +754,7 @@ def handle_fleetapi(self, path) -> str: def handle_static_content(self, path) -> str: self.proxystats[PROXY_STATS_TYPE.GETS] += 1 self.send_response(HTTPStatus.OK) - self.send_header('Content-type', 'text/html') + # self.send_header('Content-type', 'text/html') if self.pw.authmode == "token": self.send_header("Set-Cookie", f"AuthCookie=1234567890;{self.configuration[CONFIG_TYPE.PW_COOKIE_SUFFIX]}") self.send_header("Set-Cookie", f"UserRecord=1234567890;{self.configuration[CONFIG_TYPE.PW_COOKIE_SUFFIX]}")