Validate forced hosts config on reload

This commit is contained in:
md_5 2013-12-19 19:30:24 +11:00
parent f0e1625078
commit b713ccff10

View File

@ -110,6 +110,10 @@ public class Configuration implements ProxyConfig
{ {
Preconditions.checkArgument( servers.containsKey( listener.getDefaultServer() ), "Default server %s is not defined", listener.getDefaultServer() ); Preconditions.checkArgument( servers.containsKey( listener.getDefaultServer() ), "Default server %s is not defined", listener.getDefaultServer() );
Preconditions.checkArgument( servers.containsKey( listener.getFallbackServer() ), "Fallback server %s is not defined", listener.getFallbackServer() ); Preconditions.checkArgument( servers.containsKey( listener.getFallbackServer() ), "Fallback server %s is not defined", listener.getFallbackServer() );
for ( String server : listener.getForcedHosts().values() )
{
Preconditions.checkArgument( servers.containsKey( server ), "Forced host server %s is not defined", server );
}
} }
} }
} }