mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fixed remote config being reset everytime when accessed on Geyser-ViaProxy (#4722)
This commit is contained in:
parent
c3994a677b
commit
9b776b5321
1 changed files with 9 additions and 8 deletions
|
@ -34,8 +34,16 @@ import java.io.File;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@SuppressWarnings("FieldMayBeFinal") // Jackson requires that the fields are not final
|
||||||
public class GeyserViaProxyConfiguration extends GeyserJacksonConfiguration {
|
public class GeyserViaProxyConfiguration extends GeyserJacksonConfiguration {
|
||||||
|
|
||||||
|
private RemoteConfiguration remote = new RemoteConfiguration() {
|
||||||
|
@Override
|
||||||
|
public boolean isForwardHost() {
|
||||||
|
return super.isForwardHost() || !ViaProxy.getConfig().getWildcardDomainHandling().equals(ViaProxyConfig.WildcardDomainHandling.NONE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Path getFloodgateKeyPath() {
|
public Path getFloodgateKeyPath() {
|
||||||
return new File(GeyserViaProxyPlugin.ROOT_FOLDER, this.getFloodgateKeyFile()).toPath();
|
return new File(GeyserViaProxyPlugin.ROOT_FOLDER, this.getFloodgateKeyFile()).toPath();
|
||||||
|
@ -53,14 +61,7 @@ public class GeyserViaProxyConfiguration extends GeyserJacksonConfiguration {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RemoteConfiguration getRemote() {
|
public RemoteConfiguration getRemote() {
|
||||||
return new RemoteConfiguration() {
|
return this.remote;
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isForwardHost() {
|
|
||||||
return super.isForwardHost() || !ViaProxy.getConfig().getWildcardDomainHandling().equals(ViaProxyConfig.WildcardDomainHandling.NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue