sindresorhus / got

🌐 Human-friendly and powerful HTTP request library for Node.js
MIT License
14.3k stars 935 forks source link

Add option to disable UNIX domain sockets #2046

Open sindresorhus opened 2 years ago

sindresorhus commented 2 years ago

https://github.com/sindresorhus/got/blob/main/documentation/tips.md#unix-domain-sockets

It's a niche feature and have heard that some teams have their own custom code to prevent it, so it makes sense to have the ability to turn it off in Got.

I suggest:

Open questions:

TommyDew42 commented 2 years ago

Haha, I'll pick up this one! So when the setting is turned to false, the following won't work?

got('unix:/var/run/docker.sock:/containers/json');
sindresorhus commented 2 years ago

@TommyDew42 Correct. Also the http: version, per the docs.

prsmahajan commented 2 years ago

Is there anything to work with this? I guess, the issue is resolved, the maintainers should mark as closed.