feat: 首页 Go SSR 与 React hydrate 同构,消壳层与帖行闪动
补齐侧栏/右栏图标与徽章、鉴权种子、StaticFeedList,并修正嵌套 a 与标题徽章对齐。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -326,8 +326,9 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
|
||||
})
|
||||
})
|
||||
} else {
|
||||
r.GET("/", h.ServePublicSPA)
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
// 文档请求也解析登录 cookie,首页 SSR 才能输出头像/签到/收藏等完整壳
|
||||
r.GET("/", authMW.OptionalAuth(), h.ServePublicSPA)
|
||||
r.NoRoute(authMW.OptionalAuth(), func(c *gin.Context) {
|
||||
if embed_static.IsSPARoute(c.Request.URL.Path) {
|
||||
h.ServePublicSPA(c)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user