fix
This commit is contained in:
@@ -211,21 +211,6 @@ public class MainVerticle extends AbstractVerticle {
|
||||
|
||||
Router router = Router.router(vertx);
|
||||
|
||||
router.route().handler(ctx -> {
|
||||
long start = System.currentTimeMillis();
|
||||
String method = ctx.request().method().name();
|
||||
String path = ctx.request().path();
|
||||
final String remoteIp = ctx.get("realClientIp") != null ?
|
||||
ctx.get("realClientIp") :
|
||||
ctx.request().remoteAddress().host();
|
||||
ctx.addBodyEndHandler(v -> {
|
||||
long duration = System.currentTimeMillis() - start;
|
||||
log.info("{} {} - {} ms - {} - {}",
|
||||
method, path, duration, ctx.response().getStatusCode(), remoteIp);
|
||||
});
|
||||
ctx.next();
|
||||
});
|
||||
|
||||
router.route().handler(ctx -> {
|
||||
String path = ctx.request().path();
|
||||
if (path != null && path.startsWith(config.pma.basePath + "/")) {
|
||||
@@ -260,6 +245,21 @@ public class MainVerticle extends AbstractVerticle {
|
||||
}
|
||||
});
|
||||
|
||||
router.route().handler(ctx -> {
|
||||
long start = System.currentTimeMillis();
|
||||
String method = ctx.request().method().name();
|
||||
String path = ctx.request().path();
|
||||
final String remoteIp = ctx.get("realClientIp") != null ?
|
||||
ctx.get("realClientIp") :
|
||||
ctx.request().remoteAddress().host();
|
||||
ctx.addBodyEndHandler(v -> {
|
||||
long duration = System.currentTimeMillis() - start;
|
||||
log.info("{} {} - {} ms - {} - {}",
|
||||
method, path, duration, ctx.response().getStatusCode(), remoteIp);
|
||||
});
|
||||
ctx.next();
|
||||
});
|
||||
|
||||
// ------ Раздаём Vue статику ------
|
||||
router.route("/assets/*").handler(StaticHandler.create("webroot/assets"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user