MCPcopy
hub / github.com/Sophomoresty/gemini-web2api / _authorized

Method _authorized

gemini_web2api/server.py:69–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 return None
68
69 def _authorized(self):
70 keys = CONFIG.get("api_keys") or []
71 if not keys:
72 return True
73 auth = self.headers.get("Authorization", "")
74 key = auth[7:] if auth.startswith("Bearer ") else self.headers.get("x-api-key", "")
75 return key in keys
76
77 def do_OPTIONS(self):
78 self.send_response(204)

Callers 2

do_GETMethod · 0.95
do_POSTMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected