@mandujs/core 0.20.4 → 0.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/runtime/server.ts +6 -2
package/package.json
CHANGED
package/src/runtime/server.ts
CHANGED
|
@@ -830,14 +830,18 @@ async function serveStaticFile(pathname: string, settings: ServerRegistrySetting
|
|
|
830
830
|
relativePath = pathname.slice("/public/".length);
|
|
831
831
|
allowedBaseDir = path.join(settings.rootDir, settings.publicDir);
|
|
832
832
|
}
|
|
833
|
-
// 3.
|
|
833
|
+
// 3. .well-known/ 디렉토리 (#178: RFC 8615 표준 — Chrome DevTools, ACME, etc.)
|
|
834
|
+
else if (pathname.startsWith("/.well-known/")) {
|
|
835
|
+
relativePath = pathname.slice(1); // ".well-known/..."
|
|
836
|
+
allowedBaseDir = path.join(settings.rootDir, settings.publicDir);
|
|
837
|
+
}
|
|
838
|
+
// 4. Public 폴더의 루트 파일 (favicon.ico, robots.txt 등)
|
|
834
839
|
else if (
|
|
835
840
|
pathname === "/favicon.ico" ||
|
|
836
841
|
pathname === "/robots.txt" ||
|
|
837
842
|
pathname === "/sitemap.xml" ||
|
|
838
843
|
pathname === "/manifest.json"
|
|
839
844
|
) {
|
|
840
|
-
// 고정된 파일명만 허용 (이미 위에서 정확히 매칭됨)
|
|
841
845
|
relativePath = path.basename(pathname);
|
|
842
846
|
allowedBaseDir = path.join(settings.rootDir, settings.publicDir);
|
|
843
847
|
} else {
|