forked from kenzuya/unshackle
fix(serve): use X-Secret-Key header for REST API auth to match pywidevine
Standardize on X-Secret-Key across all endpoints so RemoteClient, pywidevine CDM, and api-only mode all use the same auth header. Adds lightweight middleware for --api-only mode without pywidevine dep.
This commit is contained in:
@@ -47,7 +47,7 @@ class RemoteClient:
|
||||
if self._session is None:
|
||||
self._session = requests.Session()
|
||||
if self.api_key:
|
||||
self._session.headers["X-API-Key"] = self.api_key
|
||||
self._session.headers["X-Secret-Key"] = self.api_key
|
||||
return self._session
|
||||
|
||||
def _request(self, method: str, endpoint: str, data: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user