Skip to content

Commit c504647

Browse files
authored
Add getBaseUrl() to NginxContainer using NGINX_DEFAULT_PORT (#11137)
1 parent 6cc3506 commit c504647

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/nginx/src/main/java/org/testcontainers/nginx/NginxContainer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ public NginxContainer(final DockerImageName dockerImageName) {
2727
public URL getBaseUrl(String scheme, int port) throws MalformedURLException {
2828
return new URL(scheme + "://" + getHost() + ":" + getMappedPort(port));
2929
}
30+
31+
public URL getBaseUrl(String scheme) throws MalformedURLException {
32+
return getBaseUrl(scheme, NGINX_DEFAULT_PORT);
33+
}
3034
}

0 commit comments

Comments
 (0)