From 12e2206f9d24b29c8276b2743603635620643444 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 18 Jan 2023 20:39:41 +0300 Subject: RestTemplate -> OkHttpClient --- 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 34878b69..3a6c36c4 100644 --- a/src/main/java/com/juick/www/api/webfinger/Resource.java +++ b/src/main/java/com/juick/www/api/webfinger/Resource.java @@ -38,6 +38,7 @@ import static com.juick.www.api.activity.model.Context.ACTIVITY_MEDIA_TYPE; @RestController public class Resource { + public static final String MEDIA_TYPE = "application/jrd+json"; @Inject private UserService userService; @Value("${web_domain:localhost}") @@ -46,7 +47,7 @@ public class Resource { private String baseUri; @GetMapping(value = "/.well-known/webfinger", produces = { - "application/jrd+json", MediaType.APPLICATION_JSON_VALUE }) + Resource.MEDIA_TYPE, MediaType.APPLICATION_JSON_VALUE }) public Account getWebResource(@RequestParam String resource) { if (resource.startsWith("acct:")) { try { -- cgit v1.2.3