From e17ac99c67e5069745f3f19a91c18b6d3288b6e9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 4 Jan 2023 20:42:34 +0300 Subject: ActivityPub: cleanup media types and redirects --- src/main/java/com/juick/www/api/webfinger/Resource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/juick/www/api/webfinger') 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 bc478b24..34878b69 100644 --- a/src/main/java/com/juick/www/api/webfinger/Resource.java +++ b/src/main/java/com/juick/www/api/webfinger/Resource.java @@ -24,6 +24,7 @@ import com.juick.www.api.webfinger.model.Link; import com.juick.util.HttpNotFoundException; import com.juick.service.UserService; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -45,7 +46,7 @@ public class Resource { private String baseUri; @GetMapping(value = "/.well-known/webfinger", produces = { - "application/jrd+json;charset=utf-8", Context.FALLBACK_JSON_MEDIA_TYPE }) + "application/jrd+json", MediaType.APPLICATION_JSON_VALUE }) public Account getWebResource(@RequestParam String resource) { if (resource.startsWith("acct:")) { try { -- cgit v1.2.3