diff options
author | Matt Arnold <matt@thegnuguru.org> | 2023-02-09 18:37:53 -0500 |
---|---|---|
committer | Matt Arnold <matt@thegnuguru.org> | 2023-02-09 18:37:53 -0500 |
commit | 46c18d57596a348470d0f0cfffc1c2e402693fb8 (patch) | |
tree | 0eabe61ebca6f1e8db353ee0df5b73306c322260 | |
parent | 2008d8aaec82d913bbb404f522b931c92fd07773 (diff) |
fix fat finger, add full profile
-rw-r--r-- | activitypub.go | 6 | ||||
-rw-r--r-- | main.go | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/activitypub.go b/activitypub.go index 6e8264a..a705cad 100644 --- a/activitypub.go +++ b/activitypub.go @@ -58,3 +58,9 @@ func serveUser(w http.ResponseWriter, r *http.Request) { return } + +func serveProfileHtml(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "https://treefort.piusbird.space/index", http.StatusMovedPermanently) + return + +} diff --git a/main.go b/main.go index 6fb3156..250b52f 100644 --- a/main.go +++ b/main.go @@ -555,7 +555,9 @@ func main() { r.PathPrefix("/assets/").Handler(http.StripPrefix("/assets/", http.FileServer(http.Dir("./assets")))) r.HandleFunc("/.well-known/webfinger", webfingeRequest) apRoute := r.PathPrefix("/u").Subrouter() - apRoute.HandleFunc("/u/piusbird", serveUser) + apRoute.HandleFunc("/piusbird", serveUser) + apRoute.HandleFunc("/@piusbird", serveProfileHtml) + f, err := os.OpenFile("blog-backend.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { |