fix url for https

This commit is contained in:
verboomp
2026-02-03 14:21:24 +01:00
parent 935999bb5a
commit 3a1b9a3af6
2 changed files with 16 additions and 5 deletions

View File

@@ -29,9 +29,9 @@ public record PictureValue(Long id, String comment, String category, Date pictur
LOG.error("baseUrl " + baseUrl);
String sizeUrl = baseUrl;
if(baseUrl.startsWith("http://)") && !baseUrl.startsWith("http://localhost")){
if(baseUrl.startsWith("http://") && !baseUrl.startsWith("http://localhost")){
LOG.error("starts with http:// ");
sizeUrl = "https://" + baseUrl.substring(8);
sizeUrl = "https://" + baseUrl.substring(7);
LOG.error("new baseUrl " + sizeUrl);
}
@@ -42,4 +42,4 @@ public record PictureValue(Long id, String comment, String category, Date pictur
String thumbnailSizeUrl = sizeUrl + "3";
return new PictureValue(picture.getPictureId(), picture.getComment(), picture.getCategory(), picture.getPictureDate(), picture.getUsername(), picture.getEvaluation(), imageUrl, normalSizeUrl, thumbnailSizeUrl);
}
}
}