pico

created pr with 92.1 on 2025-12-16T04:16:16Z · by c8ef7d19
cmds
checkout latest patchset:
ssh pr.pico.sh print 92 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 92.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 92
+2 -0 .gitignore #
......@@ -14,3 +14,5 @@ __debug_bin
1414 .bin
1515 /public/
1616 .aider*
17+ssh
18+web
+1 -1 pkg/apps/pgs/tunnel.go #
......@@ -126,7 +126,7 @@ func CreateHttpHandler(cfg *PgsConfig) CtxHttpBridge {
126126
127127 log.Info("user has access to site")
128128
129- routes := NewWebRouter(cfg)
129+ routes := newWebRouter(cfg)
130130 tunnelRouter := TunnelWebRouter{routes, subdomain}
131131 tunnelRouter.InitRouter()
132132 return &tunnelRouter
+6 -1 pkg/apps/pgs/web.go #
......@@ -107,13 +107,18 @@ type WebRouter struct {
107107 }
108108
109109 func NewWebRouter(cfg *PgsConfig) *WebRouter {
110+ router := newWebRouter(cfg)
111+ go router.WatchCacheClear()
112+ return router
113+}
114+
115+func newWebRouter(cfg *PgsConfig) *WebRouter {
110116 router := &WebRouter{
111117 Cfg: cfg,
112118 RedirectsCache: expirable.NewLRU[string, []*RedirectRule](2048, nil, cache.CacheTimeout),
113119 HeadersCache: expirable.NewLRU[string, []*HeaderRule](2048, nil, cache.CacheTimeout),
114120 }
115121 router.initRouters()
116- go router.WatchCacheClear()
117122 return router
118123 }
119124
Back to top