From 5b13e1a689b30a0c200558b70cd6bbe7e390b138 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 4 Aug 2022 08:22:06 +0100 Subject: [PATCH] serve: Don't require force_privacy_mode to be defined on config --- pywidevine/serve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywidevine/serve.py b/pywidevine/serve.py index f90f711..6d47791 100644 --- a/pywidevine/serve.py +++ b/pywidevine/serve.py @@ -204,7 +204,7 @@ async def challenge(request: web.Request) -> web.Response: }, status=400) # enforce service certificate (opt-in) - if request.app["config"]["force_privacy_mode"] and not cdm._sessions[session_id].service_certificate: + if request.app["config"].get("force_privacy_mode") and not cdm._sessions[session_id].service_certificate: return web.json_response({ "status": 403, "message": "No Service Certificate set but Privacy Mode is Enforced."