Class HttpsOnlyService
- java.lang.Object
-
- com.linecorp.armeria.server.DecoratingService<I,O,I,O>
-
- com.linecorp.armeria.server.SimpleDecoratingService<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
-
- org.curioswitch.common.server.framework.security.HttpsOnlyService
-
- All Implemented Interfaces:
com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
public class HttpsOnlyService extends com.linecorp.armeria.server.SimpleDecoratingService<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
ASimpleDecoratingService
which redirects HTTP requests from a proxy to HTTPS. Meant for use in an externally-facing, production frontend server (restricted servers should use an authenticating proxy like Identity-Aware Proxy, which handles redirects itself).Insecure HTTP requests are redirected to HTTPS while HTTPS responses have best practice secure headers such as Strict-Transport-Security and embed blocking.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpsOnlyService.Factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.linecorp.armeria.common.HttpResponse
serve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req)
-
Methods inherited from class com.linecorp.armeria.server.DecoratingService
as, delegate, serviceAdded, shouldCachePath, toString
-
-