Skip to content

Commit

Permalink
Update static content type handling and disable /networks URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Jan 15, 2025
1 parent 19fd3b2 commit 1904725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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]}")
Expand Down

0 comments on commit 1904725

Please sign in to comment.