mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Listen on all ips #624
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cocoon on GitHub (Aug 9, 2024).
Originally assigned to: @StefH on GitHub.
I ask this as question, maybe I missed something obvious.
When I want to listen to all public IPs I thought I could use http://0.0.0.0 as URL, but it was not working.
So I had to get all my current IPs and add them as List.
And when I check this line of code:
https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard.cs#L79
it looks like it should use "ListenAnyIP" but instead it is listed in "ListenLocalhost"?
@StefH commented on GitHub (Aug 9, 2024):
I need to double check that.
BTW what .NET version are you using?
@cocoon commented on GitHub (Aug 9, 2024):
I usually use .net 8 now.
@cocoon commented on GitHub (Aug 12, 2024):
I tried it and moved the host check for 0.0.0.0 at top and return it as ListenAnyIP and it works:
@StefH commented on GitHub (Aug 13, 2024):
Looks good.
Can you make a PR and if possible add/update a unit test?
@cocoon commented on GitHub (Sep 4, 2024):
PR created and tried to add a test.