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

Add a -bind-addr flag keeping default of 127.0.0.1 #29

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

Conversation

mjrlee
Copy link

@mjrlee mjrlee commented Mar 3, 2023

This change introduces a -bind-addr flag that is useful when serving on another address. The flag is optional and the default behaviour has not been changed.

I have also hard coded in an allowlist of possible addresses to ensure that this is not accidentally set to a public IP. The addresses are localhost and 169.254.169.254.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dwmw2
Copy link
Contributor

dwmw2 commented Jun 12, 2023

Hm, surely the default should be ::1. It's well over a quarter of a century since RFC1883 was published...

@dwmw2
Copy link
Contributor

dwmw2 commented Jun 12, 2023

We also prefer to call it an 'allowlist' these days, FWIW. Although I note that's only in the commit comment not the code itself.

@mjrlee
Copy link
Author

mjrlee commented Jun 15, 2023

Hm, surely the default should be ::1. It's well over a quarter of a century since RFC1883 was published...

Perhaps, but I think that's a different commit/PR - this keeps the default that's currently in main.

@dwmw2
Copy link
Contributor

dwmw2 commented Jun 19, 2023

It should at least be in the allowlist though?

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