From d527064c15a44e7a14f0e87e5f3f8f01baf776d8 Mon Sep 17 00:00:00 2001 From: coding4kay Date: Wed, 6 Apr 2022 00:02:22 +0200 Subject: [PATCH] add redirect to /ui/ --- deployment-sample/mifune-server/README.md | 1 + .../src/main/java/com/prodyna/mifune/api/UIResource.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment-sample/mifune-server/README.md b/deployment-sample/mifune-server/README.md index 5ef0ed23..72379a12 100644 --- a/deployment-sample/mifune-server/README.md +++ b/deployment-sample/mifune-server/README.md @@ -2,6 +2,7 @@ ## Components ### [Keycloak](http://localhost:8888) + - DO NOT USE THE EXPORTED REALM WITHOUT CHANGE THE KEYS - We start Keycloak simply with an H2 Database (for your own happiness please don't use it for production) - We initialize Keycloak with an exported realm (mifune) with client for front and backend - Admin login is setup over env variables (admin/admin) diff --git a/server/server/src/main/java/com/prodyna/mifune/api/UIResource.java b/server/server/src/main/java/com/prodyna/mifune/api/UIResource.java index ef1d1902..ec77aeae 100644 --- a/server/server/src/main/java/com/prodyna/mifune/api/UIResource.java +++ b/server/server/src/main/java/com/prodyna/mifune/api/UIResource.java @@ -66,11 +66,10 @@ public void init(@Observes Router router) { var requestHandler = vertxStaticContent.map(StaticHandler::create).orElseGet(StaticHandler::create); + router.get("/").handler(rc -> rc.redirect("/ui/")); router.get("/ui/env.json").handler(r -> r.end(env())); router.get("/ui/keycloak.json").handler(r -> r.end(keycloak())); - router.route("/ui/*").handler(requestHandler); - router .route("/ui/*") .handler(