File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
core/runtime/src/main/java/io/quarkus/runtime
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ public boolean isDevOrTest() {
2222 return this != NORMAL ;
2323 }
2424
25+ public boolean isRemoteDev () {
26+ return (current () == DEVELOPMENT ) && "true" .equals (System .getenv ("QUARKUS_LAUNCH_DEVMODE" ));
27+ }
28+
2529 private final String defaultProfile ;
2630
2731 LaunchMode (String defaultProfile ) {
Original file line number Diff line number Diff line change 1717public class HttpHostConfigSource implements ConfigSource , Serializable {
1818
1919 public static final String QUARKUS_HTTP_HOST = "quarkus.http.host" ;
20+ private static final String ALL_INTERFACES = "0.0.0.0" ;
2021
2122 private final int priority ;
2223
@@ -37,7 +38,11 @@ public int getOrdinal() {
3738 @ Override
3839 public String getValue (String propertyName ) {
3940 if (propertyName .equals (QUARKUS_HTTP_HOST )) {
40- return LaunchMode .current ().isDevOrTest () ? "localhost" : "0.0.0.0" ;
41+ if (LaunchMode .current ().isRemoteDev ()) {
42+ // in remote-dev mode we need to listen on all interfaces
43+ return ALL_INTERFACES ;
44+ }
45+ return LaunchMode .current ().isDevOrTest () ? "localhost" : ALL_INTERFACES ;
4146 }
4247 return null ;
4348 }
You can’t perform that action at this time.
0 commit comments