Refactoring - Version stable
This commit is contained in:
@@ -219,15 +219,25 @@ public class UnionFlowServerApplication implements QuarkusApplication {
|
||||
LOG.info("--------------------------------------------------------------");
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la valeur de la variable d'environnement UNIONFLOW_DOMAIN.
|
||||
* Méthode protégée pour permettre la substitution en tests.
|
||||
*
|
||||
* @return valeur de UNIONFLOW_DOMAIN, ou null si non définie
|
||||
*/
|
||||
protected String getUnionflowDomain() {
|
||||
return System.getenv("UNIONFLOW_DOMAIN");
|
||||
}
|
||||
|
||||
/**
|
||||
* Construit l'URL de base de l'application.
|
||||
*
|
||||
* @return URL complète (ex: http://localhost:8080)
|
||||
*/
|
||||
private String buildBaseUrl() {
|
||||
String buildBaseUrl() {
|
||||
// En production, utiliser le nom de domaine configuré
|
||||
if ("prod".equals(activeProfile)) {
|
||||
String domain = System.getenv("UNIONFLOW_DOMAIN");
|
||||
String domain = getUnionflowDomain();
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
return "https://" + domain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user