Skip to content

Commit

Permalink
Add localhost as permissible domain in resource filtering
Browse files Browse the repository at this point in the history
The resource filtering in the PicsureInfoService has been updated to include 'localhost' as a permissible domain. This adjustment ensures that resources interfacing with a local host are properly accounted for and included in the mapping process, in addition to resources on an existing application stack.
  • Loading branch information
Gcolon021 committed Mar 7, 2024
1 parent f85636a commit d09afde
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ public Map<UUID, String> resources(HttpHeaders headers) {
// http://dictionary.b.${env_private_dns_name}:8080/dictionary/pic-sure
// The application stack is a, b, c, etc.
// I will look for %.${application_stack}.% in the url
// Or the resource domain is localhost.
return resourceRepo.list().stream()
.filter(resource -> resource.getResourceRSPath().contains("." + JAXRSConfiguration.application_stack + "."))
.collect(Collectors.toMap(Resource::getUuid, Resource::getName));
.filter(
resource -> resource.getResourceRSPath().contains("." + JAXRSConfiguration.application_stack + ".")
|| resource.getResourceRSPath().contains("localhost")
).collect(Collectors.toMap(Resource::getUuid, Resource::getName));
}

return resourceRepo.list().stream().collect(Collectors.toMap(Resource::getUuid, Resource::getName));
Expand Down

0 comments on commit d09afde

Please sign in to comment.