mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Move the status and healthcheck to root level
This commit is contained in:
parent
8def058d85
commit
ed778639a8
1 changed files with 11 additions and 2 deletions
|
@ -119,17 +119,26 @@ public class GitBridgeServer {
|
||||||
) throws ServletException {
|
) throws ServletException {
|
||||||
HandlerCollection handlers = new HandlerList();
|
HandlerCollection handlers = new HandlerList();
|
||||||
handlers.addHandler(initApiHandler());
|
handlers.addHandler(initApiHandler());
|
||||||
|
handlers.addHandler(initBaseHandler());
|
||||||
handlers.addHandler(initGitHandler(config, repoStore, snapshotApi));
|
handlers.addHandler(initGitHandler(config, repoStore, snapshotApi));
|
||||||
jettyServer.setHandler(handlers);
|
jettyServer.setHandler(handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Handler initBaseHandler() {
|
||||||
|
ContextHandler base = new ContextHandler();
|
||||||
|
base.setContextPath("/");
|
||||||
|
HandlerCollection handlers = new HandlerList();
|
||||||
|
handlers.addHandler(new StatusHandler(bridge));
|
||||||
|
handlers.addHandler(new HealthCheckHandler(bridge));
|
||||||
|
base.setHandler(handlers);
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
|
||||||
private Handler initApiHandler() {
|
private Handler initApiHandler() {
|
||||||
ContextHandler api = new ContextHandler();
|
ContextHandler api = new ContextHandler();
|
||||||
api.setContextPath("/api");
|
api.setContextPath("/api");
|
||||||
|
|
||||||
HandlerCollection handlers = new HandlerList();
|
HandlerCollection handlers = new HandlerList();
|
||||||
handlers.addHandler(new StatusHandler(bridge));
|
|
||||||
handlers.addHandler(new HealthCheckHandler(bridge));
|
|
||||||
handlers.addHandler(initResourceHandler());
|
handlers.addHandler(initResourceHandler());
|
||||||
handlers.addHandler(new PostbackHandler(bridge));
|
handlers.addHandler(new PostbackHandler(bridge));
|
||||||
handlers.addHandler(new DefaultHandler());
|
handlers.addHandler(new DefaultHandler());
|
||||||
|
|
Loading…
Reference in a new issue