feat: HOTLINK_TEMPLATE environment variable applied to audio and video link (#17287)

Co-authored-by: linzhikang <linzhikang@bytedance.com>
This commit is contained in:
lzk 2024-10-25 02:01:02 +08:00 committed by GitHub
parent c46119dc8a
commit 7a74a131d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
// Force config hotlink template on conflict
if (config.hotlink.template) {
imageHotlinkTemplate = filterPath(ctx.req.path) ? config.hotlink.template : undefined;
multimediaHotlinkTemplate = filterPath(ctx.req.path) ? config.hotlink.template : undefined;
}
if (!imageHotlinkTemplate && !multimediaHotlinkTemplate) {