[Feature request] Add bearer token to custom server mode
I am running my ComfyUI instance behind reverse proxy and a custom API endpoint authentication. This will 1:1 forward all API calls when done with the correct bearer token. Can we have a setting to set up a bearer token to the API calls in custom server mode?
Maybe you can try, comfy_client.py, just add bearer="your token" argument to the get & post calls.
# example for post
return await self._requests.post(f"{self.url}/{op}", data, bearer="1234")
I was able to make some calls with bearer token and post and get, but only after setting the access_token at the websocket client connect (otherwise it would not connect to the server at all): https://github.com/Acly/krita-ai-diffusion/blob/47fa1abcd7ed37000c4577f5a1f384467e8ca6a5/ai_diffusion/comfy_client.py#L72 I will try to correctly implement it (GUI settings and all) and in case make a PR when I have the time