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

feat: add HOST config to control which network interface ld-relay binds to #354

Draft
wants to merge 1 commit into
base: v8
Choose a base branch
from

Conversation

brycefisher
Copy link

@brycefisher brycefisher commented May 2, 2024

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

#353

Describe the solution you've provided

By default, the existing behavior is preserved of binding all to network interfaces. However, if the config HOST is provided, ld-relay will attempt to bind that host on given PORT.

Describe alternatives you've considered

We could offer a boolean flag "BIND_LOCALHOST" or similar that would explicitly set the bind address to localhost:PORT. The provided option seemed more inline what I've seen in other projects, but I've no strong personal preference for either.

ALternatively we could allow users to specify a fully formed bind address including port and hostname in a single string. I don't like that option because we'd potentially break how folks configure how they instruct ld-relay where to run if they tried to provide both a fully formed address and a port. Keeping HOST and PORT distinct seems simpler to implement and reason about AFAICT.

Additional context

I'm not sure what this new config should be called 🤔

@brycefisher
Copy link
Author

@cwaldren-ld is there anything special I need to do to run the existing tests? Is go test good enough to iterate locally? Apologies for missing the contribution guide! Feel free to point me at that.

@cwaldren-ld
Copy link
Contributor

Hi @brycefisher , the guide is here: https://github.com/launchdarkly/ld-relay/blob/v8/CONTRIBUTING.md

@cwaldren-ld cwaldren-ld changed the title feat: add HOST config to control which network interface ld-relay bin… feat: add HOST config to control which network interface ld-relay binds to May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants