mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Should my URL be replaced with 'localhost' #597
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 @domwvitality on GitHub (May 7, 2024).
Originally assigned to: @StefH on GitHub.
When I try and configure a my WireMockServer to start with a specific address it is overwritten when created and replaced with 'localhost'.
The code above would create a new server with a URL of 'http://localhost:8102' instead of 'http://172.18.0.1:8102'
I noticed that version 1.1.10 is the last version which would set the URL to what I provided, anything after this replaced it with 'localhost'.
Is this expected behaviour?
@StefH commented on GitHub (May 7, 2024):
172.18.0.1 is your private local ip-address?
@domwvitality commented on GitHub (May 7, 2024):
Yeah, that's correct.
Docker is used to start various services we depend on and they get assigned this address and an available port number
@StefH commented on GitHub (May 7, 2024):
I understand. The logic has been changed indeed. I'll change the code in https://github.com/WireMock-Net/WireMock.Net/pull/1100
And if you want, you can test a preview version
1.5.52-ci-18499, seehttps://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@StefH commented on GitHub (May 13, 2024):
@domwvitality
Did you have time to test the preview version?
@domwvitality commented on GitHub (May 13, 2024):
@StefH
Sure, will try and get that tested and confirmed today.
@domwvitality commented on GitHub (May 16, 2024):
Hi @StefH ,
Apologies for the delay. I've just got round to testing that build and it fails for me when starting the server. I'm using the same snippet...
but when I execute I get this error...
@StefH commented on GitHub (May 17, 2024):
On my system:
ipconfig
WireMock.Net
This works fine.
Are you sure you that 172.18.0.1 is your local ip-address from your PC?
@domwvitality commented on GitHub (May 17, 2024):
Hi @StefH ,
My apologies, you're right, the IP was wrong.
Retested with http://172.19.0.1 and all is working as expected.