mnot / redbot

REDbot is lint for HTTP resources.
https://redbot.org/
Other
535 stars 51 forks source link

"Error: Access Error" Check IP for Localhost #339

Closed cdmastercom closed 7 months ago

cdmastercom commented 1 year ago

The check IP function prevents testing or using redbot against local systems. So any usage like:

redbot http://127.0.0.1:3000

Root cause: https://github.com/mnot/redbot/blob/6ac6c8ea7a1c1d890c56fc46988a55c09d7d2829/redbot/resource/fetch.py#L110-L121

When using redbot the error message is

Error: Access Error

Not sure if this is intended behaviour, but either way a better error message would be nice here. Using redbot on a local server is nice for development, so ideally users could disable this check somehow.

mnot commented 1 year ago

See enable_local_access in config.

mholt commented 7 months ago

Sorry for my naive question, but where does the config go? I found config.txt in the repo but I don't know how to actually use it. :thinking:

mnot commented 7 months ago

Its location is passed as an argument to redbot_daemon; e.g.,

python bin/redbot_daemon config.txt

mholt commented 7 months ago

Thanks for replying! I'm actually using the CLI in my case (redbot, not redbot-daemon) and I guess I can't use a config file with it or access localhost. I'll see if I can use the daemon then

Anutrix commented 7 months ago

Same issue. I am also using redbot cli.

Is there no way to use redbot cli with localhost? Does cli support config yet?