diff --git a/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java b/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java index 9c12668..17608b8 100644 --- a/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java +++ b/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java @@ -5,6 +5,7 @@ import eu.openaire.urls_worker.controllers.FullTextsController; import eu.openaire.urls_worker.util.UriBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/eu/openaire/urls_worker/controllers/GeneralController.java b/src/main/java/eu/openaire/urls_worker/controllers/GeneralController.java index 61440b8..8a02c29 100644 --- a/src/main/java/eu/openaire/urls_worker/controllers/GeneralController.java +++ b/src/main/java/eu/openaire/urls_worker/controllers/GeneralController.java @@ -94,6 +94,14 @@ public class GeneralController { return ResponseEntity.status(HttpStatus.FORBIDDEN).build(); } + // TODO - If the Controller's ip is actually a domain name, then we have to calculate its IP-address one time + // Ad a regex to check that the controller's "IP" contains only numbers and dots, if not, then we have a DOMAIN. + // So use the following code to get the number-IP address: + /* + String address = java.net.InetAddress.getByName(controllerIp).getHostAddress(); + // TOdo - checks for potential "null" or exceptions in the above code, in case the domain resolution failed + * */ + return null; // The checks are passing. }