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

Fix listen on AnyIP for url 0.0.0.0 #1165

Merged
merged 16 commits into from
Sep 7, 2024

Conversation

cocoon
Copy link
Contributor

@cocoon cocoon commented Sep 4, 2024

To listen on all available IPs this fix allows to use the following URL:

var settings = new WireMockServerSettings
{
    Urls = new string[] { "http://0.0.0.0:80" },
};
var server = WireMockServer.Start(settings);

I tried to add a test, but I think the test can be improved.
Could be split in a test for IPv4 and IPv6 and maybe the naming is not perfect.
Getting all IPs could be moved into a utility method ...
Feel free to improve afterwards.

@StefH
Copy link
Collaborator

StefH commented Sep 4, 2024

Can you please resolve the comments which you did fix?

Copy link
Collaborator

@StefH StefH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls take a look at some extra comments

@StefH
Copy link
Collaborator

StefH commented Sep 7, 2024

Thank you !

@StefH StefH merged commit 60931f6 into WireMock-Net:master Sep 7, 2024
7 checks passed
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