From 94a5298cf168fed104fa14073f53648aa7e80f34 Mon Sep 17 00:00:00 2001 From: ExplodingDragon Date: Tue, 25 Nov 2025 00:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E9=85=8D=E7=BD=AE=E6=97=B6=E6=8C=87=E5=AE=9A=E4=BA=86?= =?UTF-8?q?=20CNAME=20=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/core/meta.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/core/meta.go b/pkg/core/meta.go index 9fc1f87..02b48d6 100644 --- a/pkg/core/meta.go +++ b/pkg/core/meta.go @@ -172,6 +172,15 @@ func (s *ServerMeta) parsePageConfig(ctx context.Context, meta *PageMetaContent, data, err := vfs.ReadString(ctx, ".pages.yaml") if err != nil { zap.L().Debug("failed to read meta data", zap.String("error", err.Error())) + if len(alias) > 0 { + meta.Filters = append(meta.Filters, Filter{ + Path: "**", + Type: "redirect", + Params: map[string]any{ + "targets": alias, + }, + }) + } return nil // 配置文件不存在不是错误 }