Skip to content

Commit

Permalink
Make API behaviour more consistant
Browse files Browse the repository at this point in the history
  • Loading branch information
xHighroad committed Dec 8, 2021
1 parent be2c848 commit b87ed10
Showing 1 changed file with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,25 @@ public SettingsHttpBean getSettings() {
public SettingsHttpBean setSettings(
SettingsHttpBean settings) {

server.setContext(settings.getWebContext());
http.setBind(settings.getBindAddress());
http.setProxyScheme(settings.getProxyScheme());
http.setProxyHost(settings.getProxyHost());
http.setProxyPort(BigInteger.valueOf(settings.getProxyPort()));
if(settings.getWebContext() != null){
server.setContext(settings.getWebContext());
}

if(settings.getBindAddress() != null){
http.setBind(settings.getBindAddress());
}

if(settings.getProxyScheme() != null){
http.setProxyScheme(settings.getProxyScheme());
}

if(settings.getProxyHost() != null){
http.setProxyHost(settings.getProxyHost());
}

if(settings.getProxyPort() != null){
http.setProxyPort(BigInteger.valueOf(settings.getProxyPort()));
}

return getSettings();
}
Expand Down

0 comments on commit b87ed10

Please sign in to comment.