diff options
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Site.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java index f4f8f744..06513fcc 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -217,8 +217,12 @@ public class Site { } return "views/index"; } - - @GetMapping(path = "/{uname}/", headers = "Connection!=Upgrade") + @GetMapping(value = "/{uname}/", produces = { MediaType.APPLICATION_JSON_VALUE, Context.LD_JSON_MEDIA_TYPE, Context.ACTIVITY_MEDIA_TYPE, + Context.ACTIVITYSTREAMS_PROFILE_MEDIA_TYPE }) + public RedirectView blogRedirect(@PathVariable String uname) { + return new RedirectView("/u/" + uname); + } + @GetMapping(value = "/{uname}/", produces = { MediaType.TEXT_HTML_VALUE, MediaType.ALL_VALUE }) protected String doGetBlog(@Parameter(hidden = true) User visitor, @RequestParam(required = false, name = "show") String paramShow, @RequestParam(required = false, name = "tag") String paramTagStr, @RequestParam(required = false, name = "search") String paramSearch, |