File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ Web: # Web 页面修改相关设置
24
24
<script src="/MediaWarp/custom/emby-front-end-mod/fanart-show.js"></script>
25
25
<script src="/MediaWarp/custom/emby-front-end-mod/playbackRate.js"></script>
26
26
27
+ Robots: | # 自定义 robots.txt,若为空表示不修改
28
+ User-agent: *
29
+ Disallow: /
27
30
Crx: True # crx 美化(Emby:https://github.com/Nolovenodie/emby-crx;Jellyfin:https://github.com/newday-life/jellyfin-crx)
28
31
ActorPlus: True # 过滤没有头像的演员和制作人员
29
32
FanartShow: False # 显示同人图(fanart 图)
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ type WebSetting struct {
37
37
Custom bool // 启用用户自定义静态资源
38
38
Index bool // 是否从 custom 目录读取 index.html 文件作为首页
39
39
Head string // 添加到 index.html 的 HEAD 中
40
+ Robots string // 自定义 robots.txt,若为空表示不修改
40
41
ExternalPlayerUrl bool // 是否开启外置播放器
41
42
Crx bool // crx 美化
42
43
ActorPlus bool // 过滤没有头像的演员和制作人员
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ func InitRouter() *gin.Engine {
38
38
if config .Web .Custom { // 用户自定义静态资源目录
39
39
mediawarpRouter .Static ("/custom" , config .CostomDir ())
40
40
}
41
+ if config .Web .Robots != "" { // 自定义 robots.txt
42
+ mediawarpRouter .GET (
43
+ "/robots.txt" ,
44
+ func (ctx * gin.Context ) {
45
+ ctx .String (http .StatusOK , config .Web .Robots )
46
+ },
47
+ )
48
+ }
41
49
}
42
50
}
43
51
You can’t perform that action at this time.
0 commit comments