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);
|
LOG.error("baseUrl " + baseUrl);
|
||||||
String sizeUrl = 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:// ");
|
LOG.error("starts with http:// ");
|
||||||
sizeUrl = "https://" + baseUrl.substring(8);
|
sizeUrl = "https://" + baseUrl.substring(7);
|
||||||
LOG.error("new baseUrl " + sizeUrl);
|
LOG.error("new baseUrl " + sizeUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,18 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
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();
|
var test = new CustomerPictureResourceTest();
|
||||||
|
|
||||||
test.deploymentURL = "http://localhost:8080/";
|
test.deploymentURL = "http://localhost:8080/";
|
||||||
@@ -132,6 +143,6 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
|||||||
test.username = "adm";
|
test.username = "adm";
|
||||||
test.password = "x1t0e7Pb49";
|
test.password = "x1t0e7Pb49";
|
||||||
|
|
||||||
test.doTest();
|
test.doTest();*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user