aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r--juick-server/src/main/java/com/juick/server/SignatureManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java2
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 2361a65b..c39cdac9 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 146e78f0..a21601db 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);