Uses of Class
io.karatelabs.http.ServerConfig
Packages that use ServerConfig
-
Uses of ServerConfig in io.karatelabs.http
Methods in io.karatelabs.http that return ServerConfigModifier and TypeMethodDescriptionServerConfig.allowedOrigins(String... allowedOrigins) ServerConfig.apiPrefixEnabled(boolean apiPrefixEnabled) ServerConfig.contentSecurityPolicy(String contentSecurityPolicy) ServerConfig.contextPath(String contextPath) ServerConfig.csrfEnabled(boolean csrfEnabled) ServerConfig.csrfExemptPaths(String... csrfExemptPaths) Register paths where CSRF token validation is skipped.ServerConfig.devMode(boolean devMode) ServerConfig.devTrace(boolean devTrace) Enable fragment-trace HTML comments around everyth:insert/th:replaceresolution.ServerConfig.engineSupplier(Supplier<io.karatelabs.js.Engine> engineSupplier) Set a custom ExternalBridge to control Java interop.ServerConfig.errorTemplate404(String errorTemplate404) ServerConfig.errorTemplate500(String errorTemplate500) ServerMarkupContext.getConfig()ServerRequestCycle.getConfig()ServerRequestHandler.getConfig()ServerConfig.globalVariables(Map<String, Object> globalVariables) Set global variables that will be available in all templates and API handlers.ServerConfig.hstsEnabled(boolean hstsEnabled) ServerConfig.hstsIncludeSubDomains(boolean hstsIncludeSubDomains) ServerConfig.hstsMaxAge(long hstsMaxAge) ServerConfig.logHandler(Consumer<String> logHandler) Register paths that ship their own full HTML shell and should NOT be wrapped withshellTemplate(String).ServerConfig.referrerPolicy(String referrerPolicy) ServerConfig.requestFilter(BiFunction<HttpRequest, ServerMarkupContext, HttpResponse> requestFilter) Set a request filter that runs after session loading but before CSRF validation.ServerConfig.requestInterceptor(Consumer<HttpRequest> requestInterceptor) ServerConfig.resourceRoot(String resourceRoot) ServerConfig.securityHeadersEnabled(boolean securityHeadersEnabled) ServerConfig.sessionCookieName(String sessionCookieName) ServerConfig.sessionExpirySeconds(int sessionExpirySeconds) ServerConfig.sessionSameSite(SameSite sessionSameSite) Set theSameSiteattribute on the session cookie.ServerConfig.sessionStore(SessionStore sessionStore) ServerConfig.shellTemplate(String shellTemplate) Set a layout shell template that wraps full-page navigations.ServerConfig.staticPrefix(String staticPrefix) ServerConfig.staticPrefixEnabled(boolean staticPrefixEnabled) ServerConfig.templateRoute(String pathPattern, String templateName) Add a path pattern → template mapping.ServerConfig.xFrameOptions(String xFrameOptions) Methods in io.karatelabs.http with parameters of type ServerConfigModifier and TypeMethodDescriptionstatic voidSecurityHeaders.apply(HttpResponse response, ServerConfig config) Apply security headers to an HTTP response based on the server configuration.static ServerRequestCycleServerRequestCycle.init(ServerConfig config, ServerMarkupContext context, ResourceResolver resolver, Markup markup) Constructors in io.karatelabs.http with parameters of type ServerConfigModifierConstructorDescriptionServerMarkupContext(HttpRequest request, HttpResponse response, ServerConfig config) ServerRequestHandler(ServerConfig config, ResourceResolver resolver)