From 7a72d13ffaa54c9ee5be11a21d249ec9212782ed Mon Sep 17 00:00:00 2001 From: dahoud Date: Thu, 23 Oct 2025 22:44:03 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Suppression=20de=20quarkus.http.root-pat?= =?UTF-8?q?h=20pour=20compatibilit=C3=A9=20avec=20Ingress=20rewrite-target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le backend sert maintenant les endpoints directement sans préfixe de contexte: - /api/v1/users au lieu de /btpxpress/api/v1/users - /q/health/ready au lieu de /btpxpress/q/health/ready - /openapi au lieu de /btpxpress/openapi L'Ingress nginx gère le préfixe /btpxpress et le retire avant de transmettre au backend. Cela corrige les erreurs 404 sur tous les endpoints REST. --- Dockerfile | 2 +- src/main/resources/application-prod.properties | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 996aba3..c60a30e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,7 @@ ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ - CMD curl -f http://localhost:8080/btpxpress/q/health/ready || exit 1 + CMD curl -f http://localhost:8080/q/health/ready || exit 1 ENTRYPOINT [ "java", "-jar", "/deployments/app.jar" ] diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 5f6d739..6443d58 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -19,9 +19,9 @@ quarkus.hibernate-orm.log.bind-parameters=false # Serveur HTTP quarkus.http.port=${SERVER_PORT:8080} quarkus.http.host=0.0.0.0 -quarkus.http.root-path=/btpxpress -# Note: Backend is aware of the /btpxpress context path -# Ingress should NOT use rewrite-target to preserve the full path +# Note: Ingress nginx uses rewrite-target to strip /btpxpress prefix before forwarding +# Backend serves endpoints directly without context path (e.g., /api/v1/users, /q/health) +# External URL: https://api.lions.dev/btpxpress/... → Backend receives: /... # CORS Configuration pour production quarkus.http.cors=true