From 5751d3195416933e18d52b79bc25b9d837b41df8 Mon Sep 17 00:00:00 2001 From: Christopher Pitstick Date: Tue, 14 Jan 2025 20:25:04 -0500 Subject: [PATCH] Fix missing config types --- proxy/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/server.py b/proxy/server.py index 018ea08..01ff12a 100755 --- a/proxy/server.py +++ b/proxy/server.py @@ -331,7 +331,7 @@ def handle_control_post(self) -> bool: ) return False - if token != self.configuration['PW_CONTROL_SECRET']: + if token != self.configuration[CONFIG_TYPE.PW_CONTROL_SECRET]: self.send_json_response( {"unauthorized": "Control Command Token Invalid"}, status_code=HTTPStatus.UNAUTHORIZED @@ -858,7 +858,7 @@ def handle_static_content(self) -> str: content = b"Error during proxy" content_type = "text/plain" - if self.configuration['PW_BROWSER_CACHE'] > 0 and content_type in ['text/css', 'application/javascript', 'image/png']: + if self.configuration[CONFIG_TYPE.PW_BROWSER_CACHE] > 0 and content_type in ['text/css', 'application/javascript', 'image/png']: self.send_header("Cache-Control", f"max-age={self.configuration[CONFIG_TYPE.PW_BROWSER_CACHE]}") else: self.send_header("Cache-Control", "no-cache, no-store")