fix: 添加mime-support包并注册MIME类型以修复静态文件响应
Docker Build and Push / build (push) Has been cancelled

在Dockerfile中添加mime-support包以确保正确的MIME类型检测,同时在Go代码中显式注册.js、.mjs、.css和.map文件的MIME类型,避免浏览器因Content-Type不正确而拒绝加载静态资源。
This commit is contained in:
2026-02-10 20:57:39 +08:00
parent 07f4be3fc1
commit 1e85ad88ff
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ FROM debian:stable-slim
ENV TZ=Asia/Shanghai
RUN apt-get update \
&& apt-get install -y ca-certificates tzdata \
&& apt-get install -y ca-certificates tzdata mime-support \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app