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