R
Runpod•15mo 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
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo 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)
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo ago
yes I don't think so, btw the 401 comes from cloudflare I think
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo 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
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo ago
hmm not that I know of but let me check the extensions
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo 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?=
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo ago
thanks a lot! I'll see what I can do 🙂
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Meng
MengOP•15mo ago
turns out the login node supports api calls with token too, adding the token solved the issue
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
scchess
scchess•15mo ago
Sorry, how to disable "login custom node"?
Unknown User
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?