R
RunPod•3mo ago
Meng

comfyui api 401 unauthorized

I installed comfyui to runpod, which works fine in the browser. However, when I try to access the same URL through axios to use the comfyui api, I get 401 Unauthorized. what may be the problem?
17 Replies
nerdylive
nerdylive•3mo ago
Send your request example how you are sending it.
Meng
Meng•3mo ago
simply: const res = await axios.get(${COMFY_SERVER}/); the url is correct and opens in the browser but axios returns 401 unauthorized (post, /prompt, etc. all same)
nerdylive
nerdylive•3mo ago
Is there like an update to comfyui Some authentication perhaps From local?
Meng
Meng•3mo ago
yes I don't think so, btw the 401 comes from cloudflare I think
nerdylive
nerdylive•3mo ago
Hm what What if you try from the pods immediately
Meng
Meng•3mo ago
this is the full response: let me see about that says cloudflare in there somewhere, that's why I thought so strange thing is, when I access the same url from the browser on my computer, it works. not with axios, which is kinda strangfe
nerdylive
nerdylive•3mo ago
It's from comfyui You set any login? It uses cloudflare yes but I don't think that is the reason that it's Givin 401 How did you setup your comfyui with login?
Meng
Meng•3mo ago
hmm not that I know of but let me check the extensions
nerdylive
nerdylive•3mo ago
jvijp6qn748txu-8188.proxy.runpod.net That is ur url Extracted from your request Try opening it in new incognito or private tab You'll see
Meng
Meng•3mo ago
ohhhh yes there really is a login custom node. disabling it worked 🙂 thanks! another quick question then: is there a way to have an ACL kind of thing on my pod? like accept only requests from this ip? or would I have to implement it myself in comfy's code etc?=
nerdylive
nerdylive•3mo ago
Your welcome Custom node will do, if you have any There's no built in option yet on runpod sadly Or any proxy you can use works in pod is also viable
Meng
Meng•3mo ago
thanks a lot! I'll see what I can do 🙂
nerdylive
nerdylive•3mo ago
Yaa
Meng
Meng•3mo ago
turns out the login node supports api calls with token too, adding the token solved the issue
nerdylive
nerdylive•3mo ago
Nc
scchess
scchess•2mo ago
Sorry, how to disable "login custom node"?
nerdylive
nerdylive•2mo ago
go to custom_nodes folder of your comfyUI then delete that specific custom node or disable from comfyui manager
Want results from more Discord servers?
Add your server