Signed-off-by: Seongmin Lee git@boltless.me
+15
-1
Diff
round #1
+13
-1
appview/oauth/handler.go
+13
-1
appview/oauth/handler.go
···
96
96
go o.addToDefaultSpindle(sessData.AccountDID.String())
97
97
go o.ensureTangledProfile(sessData)
98
98
go o.autoClaimTnglShDomain(sessData.AccountDID.String())
99
-
go o.drainPdsRewrites(sessData)
100
99
101
100
if !o.Config.Core.Dev {
102
101
err = o.Posthog.Enqueue(posthog.Capture{
···
275
274
l.Debug("successfully created empty Tangled profile on PDS and DB")
276
275
}
277
276
277
+
func (o *OAuth) PdsRewriteMiddleware(next http.Handler) http.Handler {
278
+
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
279
+
defer next.ServeHTTP(w, r)
280
+
281
+
sess, err := o.ResumeSession(r)
282
+
if err != nil {
283
+
return
284
+
}
285
+
286
+
go o.drainPdsRewrites(sess.Data)
287
+
})
288
+
}
289
+
278
290
func (o *OAuth) drainPdsRewrites(sessData *oauth.ClientSessionData) {
279
291
ctx := context.Background()
280
292
did := sessData.AccountDID.String()
History
2 rounds
0 comments
boltless.me
submitted
#1
1 commit
expand
collapse
appview: drain pds rewrites on any active sessions
Signed-off-by: Seongmin Lee <git@boltless.me>
3/3 failed
expand
collapse
no conflicts, ready to merge
expand 0 comments
boltless.me
submitted
#0
1 commit
expand
collapse
appview: drain pds rewrites on any active sessions
Signed-off-by: Seongmin Lee <git@boltless.me>