Skip to content

Commit

Permalink
Fix: Update https
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMBourgeois committed Feb 27, 2024
1 parent 31c768b commit d2bb14a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/fr/insee/rmes/config/ApplicationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ public RestTemplate restTemplate(RestTemplateBuilder builder) {

@Bean
public OpenAPI customOpenAPI() {
String serverUrl = "http://";
if (isProductionProfileActive()) {
return new OpenAPI().servers(List.of(
new Server().url("https://" + serverHost ).description("HTTPS Server")));
} else {
return new OpenAPI();
serverUrl = "https://";
}

return new OpenAPI().servers(List.of(
new Server().url(serverUrl + serverHost).description("Server")));
}

private boolean isProductionProfileActive() {
Expand Down

0 comments on commit d2bb14a

Please sign in to comment.