소스 검색

fix: Fix jetty crashing when redirecting HTTP to HTTPS

Jetty 9.3 changed the `setHandler` on the ServletContextHandler to no
longer automatically detect SecurityHandler, SessionHandler, etc. It
simply passes on the setHandler request to the ContextHandler class
(with a warning logged). So make sure to explicitly use the method
`setSecurityHandler` to set the ContraintSecurityHandler responsible
for the http -> https redirection.
pull/1438/head
Florian Zschocke 1 년 전
부모
커밋
609130e26c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/main/java/com/gitblit/GitBlitServer.java

+ 1
- 1
src/main/java/com/gitblit/GitBlitServer.java 파일 보기

@@ -453,7 +453,7 @@ public class GitBlitServer {
sh.setConstraintMappings(new ConstraintMapping[] { cm });

// Configure this context to use the Security Handler defined before
rootContext.setHandler(sh);
rootContext.setSecurityHandler(sh);
}

// Setup the Gitblit context

Loading…
취소
저장