fix url for https
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,18 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
||||
String baseUrl = "http://hartmann-cue.heydevelop.de/api/";
|
||||
//String baseUrl = "http://localhost:8080/api/";
|
||||
|
||||
String sizeUrl = baseUrl;
|
||||
System.out.println();
|
||||
if(baseUrl.startsWith("http://") && !baseUrl.startsWith("http://localhost")){
|
||||
System.out.println("starts with http:// ");
|
||||
sizeUrl = "https://" + baseUrl.substring(7);
|
||||
System.out.println("new baseUrl " + sizeUrl);
|
||||
}
|
||||
|
||||
/*
|
||||
var test = new CustomerPictureResourceTest();
|
||||
|
||||
test.deploymentURL = "http://localhost:8080/";
|
||||
@@ -132,6 +143,6 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
||||
test.username = "adm";
|
||||
test.password = "x1t0e7Pb49";
|
||||
|
||||
test.doTest();
|
||||
test.doTest();*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user