aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/www/api/hostmeta/HostMeta.java3
-rw-r--r--src/main/java/com/juick/www/api/webfinger/Resource.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/api/hostmeta/HostMeta.java b/src/main/java/com/juick/www/api/hostmeta/HostMeta.java
index 01d3f202c..c6f1dce6b 100644
--- a/src/main/java/com/juick/www/api/hostmeta/HostMeta.java
+++ b/src/main/java/com/juick/www/api/hostmeta/HostMeta.java
@@ -20,6 +20,7 @@ package com.juick.www.api.hostmeta;
import com.cliqset.xrd.Link;
import com.cliqset.xrd.XRD;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -31,7 +32,7 @@ import static com.cliqset.xrd.XRDConstants.XRD_MEDIA_TYPE;
public class HostMeta {
@Value("${ap_base_uri:http://localhost:8080/}")
private String baseUri;
- @GetMapping(value = "/.well-known/host-meta", produces = XRD_MEDIA_TYPE)
+ @GetMapping(value = "/.well-known/host-meta", produces = { XRD_MEDIA_TYPE, MediaType.APPLICATION_XML_VALUE })
public XRD hostMetaResponse() {
Link webfinger = new Link();
webfinger.setTemplate(String.format("%swebfinger?resource={uri}", baseUri));
diff --git a/src/main/java/com/juick/www/api/webfinger/Resource.java b/src/main/java/com/juick/www/api/webfinger/Resource.java
index c4e0d5cab..bc478b245 100644
--- a/src/main/java/com/juick/www/api/webfinger/Resource.java
+++ b/src/main/java/com/juick/www/api/webfinger/Resource.java
@@ -18,6 +18,7 @@
package com.juick.www.api.webfinger;
import com.juick.model.User;
+import com.juick.www.api.activity.model.Context;
import com.juick.www.api.webfinger.model.Account;
import com.juick.www.api.webfinger.model.Link;
import com.juick.util.HttpNotFoundException;
@@ -43,7 +44,8 @@ public class Resource {
@Value("${ap_base_uri:http://localhost:8080/}")
private String baseUri;
- @GetMapping(value = "/.well-known/webfinger", produces = "application/jrd+json;charset=utf-8")
+ @GetMapping(value = "/.well-known/webfinger", produces = {
+ "application/jrd+json;charset=utf-8", Context.FALLBACK_JSON_MEDIA_TYPE })
public Account getWebResource(@RequestParam String resource) {
if (resource.startsWith("acct:")) {
try {