Skip to content

Commit be541f4

Browse files
committed
Forgot middleware
1 parent f71a541 commit be541f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stubbornjava-webapp/src/main/java/com/stubbornjava/webapp/StubbornJavaWebApp.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ private static HttpHandler contentSecurityPolicy(HttpHandler delegate) {
4747
}
4848
// {{end:csp}}
4949

50+
// {{start:middleware}}
5051
private static HttpHandler wrapWithMiddleware(HttpHandler next) {
5152
return MiddlewareBuilder.begin(PageRoutes::redirector)
5253
.next(handler -> CustomHandlers.securityHeaders(handler, ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN))
@@ -58,6 +59,7 @@ private static HttpHandler wrapWithMiddleware(HttpHandler next) {
5859
.next(StubbornJavaWebApp::exceptionHandler)
5960
.complete(next);
6061
}
62+
// {{end:middleware}}
6163

6264
// These routes do not require any authentication
6365
private static final HttpHandler basicRoutes = new RoutingHandler()

0 commit comments

Comments
 (0)