https://linen.dev logo
#help
Title
# help
a

Arun Gopalpuri

07/10/2023, 11:26 PM
Is there a way to specify
basePath
in wiremock? Want to start my standalone wiremock server at http://localhost:8080/wiremock/ instead of http://localhost:8080
o

Oleg Nenashev

07/11/2023, 8:53 AM
Unless I miss somethin g in https://github.com/wiremock/wiremock/blob/600c56531d43fb3d0138d3c9b85ff76be8870eb3[…]java/com/github/tomakehurst/wiremock/jetty/JettyHttpServer.java, it is not configurable at the moment when the default server is used. Am I right @Tom? While totally possible via extension, I think adding a CLI parameter would be justified here
t

Tom

07/11/2023, 9:53 AM
There’s nothing OOTB to achieve this, but you could create a simple request filter extension to prepend
/wiremock
onto incoming URL paths.
s

Sam

07/11/2023, 10:06 AM
can wiremock proxy to itself?
I’m thinking while it would not really be hosted at
/wiremock
- you could possibly make it appear to be with mappings
t

Tom

07/11/2023, 10:35 AM
Yeah, you probably could do it that way actually, using the
proxyUrlPrefixToRemove
parameter to remove
/wiremock
. I’ve never tried it, but I can’t see any reason it wouldn’t work.
a

Arun Gopalpuri

07/13/2023, 5:55 PM
Thanks @Sam @Tom using proxy worked.
🙌 3
2 Views