Skip to content

Commit

Permalink
Fix missing config types
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexarian committed Jan 15, 2025
1 parent a04be08 commit 5751d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 5751d31

Please sign in to comment.