guoziyun 3 주 전
부모
커밋
c6223a2d7f
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      platform/server/dist/index.js
  2. 0 1
      platform/server/dist/index.js.map

+ 3 - 1
platform/server/dist/index.js

@@ -33,7 +33,9 @@ async function main() {
     app.use("/api/v1", (0, builds_1.buildsRouter)(db, STORAGE_DIR, preview_2.onThemeSaved));
     app.use("/api/v1", (0, preview_1.previewRouter)(db, STORAGE_DIR));
     // 构建预览文件(真机扫码测试)
-    app.use("/q", express_1.default.static(path_1.default.join(STORAGE_DIR, "previews")));
+    const previewsDir = path_1.default.join(STORAGE_DIR, "previews");
+    app.use("/q", express_1.default.static(previewsDir));
+    app.use("/q", (_req, res) => res.status(404).send("Preview not found"));
     // 生产环境:serve React 静态文件
     app.use(express_1.default.static(CLIENT_DIST));
     app.get("*", (_req, res) => {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1
platform/server/dist/index.js.map


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.