1
Fork 0
mirror of https://github.com/Quackster/Havana.git synced 2025-07-03 05:07:46 +00:00

site.imager.path -> site.imager.endpoint for less confusion

This commit is contained in:
Alex 2023-02-12 11:23:05 +10:00
parent abe76e9526
commit 348bbf76dd
5 changed files with 6 additions and 13 deletions

View file

@ -30,14 +30,14 @@ public class ImagerController {
if (Watchdog.IS_IMAGER_ONLINE) {
var reqConfig = RequestConfig.custom()
.setConnectTimeout(GameConfiguration.getInstance().getInteger("site.imaging.timeout"))
.setConnectTimeout(GameConfiguration.getInstance().getInteger("site.imaging.endpoint.timeout"))
.build();
try (final var httpClient = HttpClientBuilder.create()
.setDefaultRequestConfig(reqConfig)
.build()) {
HttpGet request = new HttpGet(GameConfiguration.getInstance().getString("site.imaging.path") + webConnection.request().uri());
HttpGet request = new HttpGet(GameConfiguration.getInstance().getString("site.imaging.endpoint") + webConnection.request().uri());
request.addHeader(HttpHeaders.USER_AGENT, "Imager");
try (var r = httpClient.execute(request)) {

View file

@ -77,7 +77,7 @@ public class Watchdog implements Runnable {
if (this.counter.get() % 30 == 0) {
try {
String imagerPath = GameConfiguration.getInstance().getString("site.imaging.path");
String imagerPath = GameConfiguration.getInstance().getString("site.imaging.endpoint");
if (!imagerPath.isBlank()) {
try {

View file

@ -33,7 +33,6 @@ public class SiteBinder implements TemplateBinder {
private int visits;
private String housekeepingPath;
private String staticContentPath;
private String habboImagingPath;
private String loaderFlashBase;
private String loaderFlashSwf;
@ -64,8 +63,6 @@ public class SiteBinder implements TemplateBinder {
this.emailStaticPath = GameConfiguration.getInstance().getString("email.static.content.path");
this.emailHotelName = StringUtils.capitalise(GameConfiguration.getInstance().getString("site.path").replace("https://", "").replace("http://", "").replace("/", ""));
this.habboImagingPath = GameConfiguration.getInstance().getString("site.imaging.path");//"https://alex-dev.org";
this.loaderGameIp = GameConfiguration.getInstance().getString("loader.game.ip");
this.loaderGamePort = GameConfiguration.getInstance().getString("loader.game.port");
@ -157,10 +154,6 @@ public class SiteBinder implements TemplateBinder {
return staticContentPath;
}
public String getHabboImagingPath() {
return habboImagingPath;
}
public String getLoaderFlashBase() {
return loaderFlashBase;
}

View file

@ -14,8 +14,8 @@ public class WebSettingsConfigWriter implements ConfigWriter {
config.put("site.name", "Habbo");
config.put("site.path", "http://localhost");
config.put("static.content.path", "http://localhost");
config.put("site.imaging.path", "http://localhost:5000");
config.put("site.imaging.timeout", "30000");
config.put("site.imaging.endpoint", "http://localhost:5000");
config.put("site.imaging.endpoint.timeout", "30000");
config.put("hotel.check.online", "true");

View file

@ -181,7 +181,7 @@ To be honest, this server doesn't require much. I'd argue that the MariaDB serve
- JDK >= 17
- MariaDB server
I recommend setting up your own 2009 figure image renderer with the project I've created [here](https://github.com/Quackster/Minerva) to render Habbo looks on the website - and then set the endpoint in settings for value ``site.imager.path``.
I recommend setting up your own 2009 figure image renderer with the project I've created [here](https://github.com/Quackster/Minerva) to render Habbo looks on the website - and then set the endpoint in settings for value ``site.imager.endpoint``.
# Installation