Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement UNIX socket support for gRPC and HTTP listeners #511

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hbjydev
Copy link

@hbjydev hbjydev commented Mar 28, 2024

What this PR does:

This PR resolves an issue when trying to set the HTTPListenNetwork or GRPCListenNetwork config values to unix where a port would be appended to the file path, preventing the socket from being bound.

As an example, take this configuration:

server:
  http_listen_network: unix
  http_listen_address: /var/run/http.sock

This would lead to a listener being created for unix:///var/run/http.sock:80, including the default value for the HTTPListenPort, :80.

This PR adds a brief check to see if the network is unix and if so, removes the port from the address, leading to the correct address being bound (unix:///var/run/http.sock).

Which issue(s) this PR fixes:

Fixes #475

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support listening on unix sockets
2 participants