网站自带一套彩色 emoji 字体(Noto Color Emoji 的 COLRv1 版,按区段分 11 包,用到哪包才下哪包), 不再依赖系统字体。Caddy 对字体文件永久缓存。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cea2c7f102
commit
18b11e3730
13 files changed
+162
-2
No files matched your search
+5
-2
@@ -38,7 +38,7 @@
|
||||
|
||||
# 判题机心跳每秒一次;静态资源量大且带永久缓存。两者都不记访问日志。
|
||||
# 路径跟着新后端改了:judge_server_heartbeat → judge-server/heartbeat
|
||||
@nolog path /api/judge-server/heartbeat /api/judge-server/heartbeat/ /assets/*
|
||||
@nolog path /api/judge-server/heartbeat /api/judge-server/heartbeat/ /assets/* /emoji/*
|
||||
log_skip @nolog
|
||||
|
||||
handle /api/* {
|
||||
@@ -65,7 +65,10 @@
|
||||
|
||||
# 构建产物文件名带内容 hash,内容一变文件名就变,可以永久缓存。
|
||||
# 命中后浏览器直接读磁盘,不再发条件请求。
|
||||
handle /assets/* {
|
||||
# emoji 字体(见 public/style.css)文件名不带 hash,但带了版本号(noto-v47-N),
|
||||
# 内容不会原名改动,同样永久缓存 —— 否则每次开页面每个分包都要回源校验一次。
|
||||
@immutable path /assets/* /emoji/*
|
||||
handle @immutable {
|
||||
root * /srv
|
||||
header Cache-Control "public, max-age=31536000, immutable"
|
||||
file_server
|
||||
|
||||
Reference in new issue
Block a user