Add optional SwarmUI service using Deck ComfyUI API
This commit is contained in:
1 parent
706306d7b8
commit
18adaf4a52
11 files changed
+232
-3
No files matched your search
+2
-1
@@ -189,7 +189,8 @@ class APIHandler(BaseHTTPRequestHandler):
|
||||
ep=self.server.endpoint;admitted=False
|
||||
try:
|
||||
browser=bool(ep.video and ep.scheduler.gpu_mode=='video' and getattr(ep,'video_browser_auth',lambda h:False)(self.headers))
|
||||
if not browser and not ep.authenticate(self.headers.get('Authorization','')):raise APIError('Gültiger API-Bearer-Token oder Deck-Anmeldung erforderlich.',401,'invalid_api_key')
|
||||
service_auth=bool(ep.video and callable(getattr(type(ep.video),'service_authenticated',None)) and ep.video.service_authenticated(self.headers.get('Authorization','')))
|
||||
if not browser and not service_auth and not ep.authenticate(self.headers.get('Authorization','')):raise APIError('Gültiger API-Bearer-Token oder Deck-Anmeldung erforderlich.',401,'invalid_api_key')
|
||||
origin=self.headers.get('Origin')
|
||||
if origin and (not browser or origin not in ('http://'+self.headers.get('Host',''),'https://'+self.headers.get('Host',''))):raise APIError('Cross-Origin-API-Zugriff nicht erlaubt.',403)
|
||||
with ep.lock:
|
||||
|
||||
Reference in new issue
Block a user