public class HttpConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ctx |
static boolean |
secure |
static int |
securePort |
| Constructor and Description |
|---|
HttpConfig() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allowExtensiveRemoteAddrResolving() |
static String |
contextPath() |
static void |
contextPath(String context)
Set url context path.
|
static Locale |
defaultLocale() |
static void |
defaultLocale(Locale locale) |
static String |
domain() |
static void |
domain(String domain) |
static boolean |
isCookieHttpOnly() |
static boolean |
isCookieSecure()
Returns the cookie secure configuration
|
static boolean |
isXForwardedAllowed()
Does the app support x-forwarded headers
|
static boolean |
isXForwardedAllowed(String remoteAddr)
Does the remote address is allowed for x-forwarded header
|
static int |
nonSecurePort() |
static void |
nonSecurePort(int port) |
static int |
port() |
static boolean |
secure() |
static void |
secure(boolean setting) |
static int |
securePort() |
static void |
securePort(int port) |
static org.osgl.cache.CacheService |
sessionCache() |
static void |
setCookieHttpOnly(boolean httpOnly) |
static void |
setCookieSecure(boolean secure)
Configure cookie secure
|
static void |
setExtensiveRemoteAddrResolving(boolean setting) |
static void |
setSessionCache(org.osgl.cache.CacheService cache) |
static void |
setXForwardedAllowed(String allowed)
Set allowed proxy ips for x-forwarded headers
|
public static int securePort
public static boolean secure
public static String ctx
public static void setSessionCache(org.osgl.cache.CacheService cache)
public static org.osgl.cache.CacheService sessionCache()
public static void defaultLocale(Locale locale)
public static Locale defaultLocale()
public static void domain(String domain)
public static String domain()
public static void nonSecurePort(int port)
public static int nonSecurePort()
public static int port()
public static void securePort(int port)
public static int securePort()
public static void secure(boolean setting)
public static boolean secure()
public static void contextPath(String context)
context - the context path to be configuredpublic static String contextPath()
public static void setXForwardedAllowed(String allowed)
allowed - the allowed proxy ipspublic static boolean isXForwardedAllowed()
public static boolean isXForwardedAllowed(String remoteAddr)
remoteAddr - the remote addresspublic static void setExtensiveRemoteAddrResolving(boolean setting)
public static boolean allowExtensiveRemoteAddrResolving()
public static boolean isCookieSecure()
public static void setCookieSecure(boolean secure)
secure - cookie securepublic static boolean isCookieHttpOnly()
public static void setCookieHttpOnly(boolean httpOnly)
Copyright © 2017. All Rights Reserved.