aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/hostmeta
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-30 17:25:04 +0300
committerGravatar Vitaly Takmazov2022-12-30 17:25:04 +0300
commit331dd7d9ec7c6ba50a4c4912f8e62fcc84c6c461 (patch)
treec245b632eb0940669e25ee8a444e581f9839972f /src/main/java/com/juick/www/api/hostmeta
parent01a4463ea7df9c6491d6181008112b7cebd27b51 (diff)
Accept fallback content types on `host-meta` and `webfinger` endpoints
Diffstat (limited to 'src/main/java/com/juick/www/api/hostmeta')
-rw-r--r--src/main/java/com/juick/www/api/hostmeta/HostMeta.java3
1 files changed, 2 insertions, 1 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 01d3f202..c6f1dce6 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));