mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2026-03-06 22:37:58 -05:00
gunnbuilder and imageurl fixes
This commit is contained in:
@@ -65,13 +65,13 @@ public class ProductDto {
|
||||
public void setInStock(Boolean inStock) { this.inStock = inStock; }
|
||||
|
||||
public String getImageUrl() { return imageUrl; }
|
||||
public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; }
|
||||
public void setImageUrl(String imageUrl) { this.imageUrl = UrlUtils.toHttps(imageUrl); }
|
||||
|
||||
public String getMainImageUrl() { return mainImageUrl; }
|
||||
public void setMainImageUrl(String mainImageUrl) { this.mainImageUrl = mainImageUrl; }
|
||||
public void setMainImageUrl(String mainImageUrl) { this.mainImageUrl = UrlUtils.toHttps(mainImageUrl); }
|
||||
|
||||
public String getBattlImageUrl() { return battlImageUrl; }
|
||||
public void setBattlImageUrl(String battlImageUrl) { this.battlImageUrl = battlImageUrl; }
|
||||
public void setBattlImageUrl(String battlImageUrl) { this.battlImageUrl = UrlUtils.toHttps(battlImageUrl); }
|
||||
|
||||
public String getSlug() { return slug; }
|
||||
public void setSlug(String slug) { this.slug = slug; }
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package group.goforward.battlbuilder.web.dto.product;
|
||||
|
||||
public final class UrlUtils {
|
||||
|
||||
private UrlUtils() {
|
||||
// utility class
|
||||
}
|
||||
|
||||
public static String toHttps(String url) {
|
||||
if (url == null || url.isBlank()) {
|
||||
return url;
|
||||
}
|
||||
if (url.startsWith("http://")) {
|
||||
return "https://" + url.substring("http://".length());
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
||||
@@ -84,4 +84,4 @@ ai.enrichment.provider=openai
|
||||
spring.jackson.serialization.fail-on-empty-beans=false
|
||||
|
||||
# looking for a fix to the http & https CORS issue
|
||||
server.forward-headers-strategy=framework
|
||||
server.forward-headers-strategy=framework
|
||||
|
||||
Reference in New Issue
Block a user