got icon indicating copy to clipboard operation
got copied to clipboard

Add option to disable UNIX domain sockets

Open sindresorhus opened this issue 2 years ago • 3 comments

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:

  • [ ] Add option to turn off support for UNIX domain sockets. Make it false by default.
  • [ ] In Got v13 (next major release), change it to be true by default.

Open questions:

  • Should a Unix socket be able to redirect to HTTP?

sindresorhus avatar May 25 '22 17:05 sindresorhus

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');

TommyDew42 avatar Jun 15 '22 05:06 TommyDew42

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

sindresorhus avatar Jun 15 '22 15:06 sindresorhus

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

prsmahajan avatar Jun 30 '22 18:06 prsmahajan