Class Addresses
java.lang.Object
com.djrapitops.plan.delivery.webserver.Addresses
In charge of address management.
Possible scenarios (problem domain): - IP in server properties is 0.0.0.0 which is invalid - IP in server properties is empty string, which is invalid - Alternative IP is set in the Plan config - Proxy server is used as main webserver, this address has highest priority - Webserver is disabled, external webserver address in config should be used - Webserver uses either http or https - Webserver always has a port, but Alternative IP can be used to remove the port from the address
What are the addresses used in: - Given as links to commands - Redirection - Storing proxy server address in database
-
Constructor Summary
ConstructorDescriptionAddresses
(PlanConfig config, DBSystem dbSystem, dagger.Lazy<ServerProperties> serverProperties, dagger.Lazy<WebServer> webserver) -
Method Summary
-
Constructor Details
-
Addresses
@Inject public Addresses(PlanConfig config, DBSystem dbSystem, dagger.Lazy<ServerProperties> serverProperties, dagger.Lazy<WebServer> webserver)
-
-
Method Details
-
getMainAddress
-
getAccessAddress
-
getFallbackLocalhostAddress
-
getProxyServerAddress
-
getAnyValidServerAddress
-
getServerPropertyIP
-
isWebserverEnabled
public boolean isWebserverEnabled() -
getBasePath
-