R
RunPod•4mo 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•4mo ago
Send your request example how you are sending it.
Meng
MengOP•4mo 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•4mo ago
Is there like an update to comfyui Some authentication perhaps From local?
Meng
MengOP•4mo ago
yes I don't think so, btw the 401 comes from cloudflare I think
nerdylive
nerdylive•4mo ago
Hm what What if you try from the pods immediately
Meng
MengOP•4mo 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•4mo 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
MengOP•4mo ago
hmm not that I know of but let me check the extensions
nerdylive
nerdylive•4mo 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
MengOP•4mo 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•4mo 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
MengOP•4mo ago
thanks a lot! I'll see what I can do 🙂
nerdylive
nerdylive•4mo ago
Yaa
Meng
MengOP•4mo ago
turns out the login node supports api calls with token too, adding the token solved the issue
nerdylive
nerdylive•4mo ago
Nc
scchess
scchess•3mo ago
Sorry, how to disable "login custom node"?
nerdylive
nerdylive•3mo 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