From a76bcf8d84c2ecc4ceae7f91ce86fd18100b4ecd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Sep 2018 10:02:06 +0300 Subject: disable rss link from WebFinger response --- .../src/main/java/com/juick/server/api/webfinger/Resource.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/api') diff --git a/juick-server/src/main/java/com/juick/server/api/webfinger/Resource.java b/juick-server/src/main/java/com/juick/server/api/webfinger/Resource.java index d3829de4..2df895fd 100644 --- a/juick-server/src/main/java/com/juick/server/api/webfinger/Resource.java +++ b/juick-server/src/main/java/com/juick/server/api/webfinger/Resource.java @@ -13,7 +13,7 @@ import org.springframework.web.util.UriComponentsBuilder; import rocks.xmpp.addr.Jid; import javax.inject.Inject; -import java.util.Arrays; +import java.util.Collections; @RestController public class Resource { @@ -37,15 +37,9 @@ public class Resource { blog.setRel("self"); blog.setType("application/activity+json"); blog.setHref(builder.toUriString()); - UriComponentsBuilder rssBuilder = UriComponentsBuilder.fromHttpUrl(baseUri); - rssBuilder.path(String.format("/rss/%s/blog", user.getName())); - Link rss = new Link(); - rss.setRel("self"); - rss.setType("application/rss+xml"); - rss.setHref(rssBuilder.toUriString()); Account result = new Account(); result.setSubject(resource); - result.setLinks(Arrays.asList(blog, rss)); + result.setLinks(Collections.singletonList(blog)); return result; } } -- cgit v1.2.3