diff options
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/SignatureManager.java | 2 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/SignatureManager.java b/juick-server/src/main/java/com/juick/server/SignatureManager.java index 2361a65b2..c39cdac90 100644 --- a/juick-server/src/main/java/com/juick/server/SignatureManager.java +++ b/juick-server/src/main/java/com/juick/server/SignatureManager.java @@ -78,7 +78,7 @@ public class SignatureManager { logger.info("person not found"); return false; } - Optional<Context> getContext(URI contextUri) { + public Optional<Context> getContext(URI contextUri) { try { return Optional.of(new RestTemplate().getForEntity(contextUri, Context.class).getBody()); } catch (HttpClientErrorException e) { diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java index 146e78f0c..a21601dbb 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java @@ -245,7 +245,7 @@ public class Profile { @RequestHeader(name = "Signature", required = false) String signature) throws JsonProcessingException { UriComponents componentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri().build(); Map<String, String> headers = new HashMap<>(); - headers.put("host", host); + headers.put("host", host.split(":", 2)[0]); headers.put("date", date); headers.put("digest", digest); headers.put("content-type", contentType); |