claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Feature Request: Allow curl/wget for .localhost domains

Open andrzejsliwa opened this issue 1 year ago • 6 comments

Feature Request: Allow curl/wget for .localhost domains

Description

Currently, Claude Code blocks curl and wget commands for security reasons. While this restriction makes sense for external domains, it creates challenges when working with local development environments, especially those using Traefik or similar tools that rely on .localhost domains.

Use Case

I'm working with a containerized application setup using docker-compose with Traefik routing traffic to various services on .localhost domains (n8n.localhost, qdrant.localhost, etc.). When testing if my services are properly running and accessible, I need to verify HTTP responses but can't use curl or wget to check these local domains.

Proposed Solution

Allow curl and wget commands specifically for .localhost domains while maintaining restrictions for external domains. This would:

  1. Maintain security by preventing external network requests
  2. Support local development workflows
  3. Allow proper verification of container-based applications

Impact

This would significantly improve Claude's usefulness for container-based development workflows, especially when working with reverse proxies and local domain routing, without compromising security.

Additional Context

This is particularly relevant for self-hosted infrastructure projects where verifying local HTTP endpoints is essential to confirming proper configuration.

andrzejsliwa avatar Mar 05 '25 09:03 andrzejsliwa

Thanks, @andrzejsliwa. As of last week, you can paste in a URL for Claude to read—let me know if you hit any snags.

reverie avatar Mar 24 '25 14:03 reverie

This is not fixed. Claude wants to execute something like "Bash(curl -X GET "http://localhost:4000/api/docs/list?visibility=private" -b cookies.txt)" when testing the local development and its super annoying that i cannot whitelist http://localhost:4000/*

freiit avatar Jun 04 '25 14:06 freiit

I also cannot get an consistency out of curl permissions.

omayhemo avatar Jun 11 '25 22:06 omayhemo

I also still cannot execute curl -s without permissions.

jmworks avatar Jul 16 '25 07:07 jmworks

yes it constantly demands for curl permission, it's not automatic at all

fallonou1999 avatar Aug 02 '25 04:08 fallonou1999

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 11 '25 14:08 github-actions[bot]