meno-core 1.0.28 → 1.0.30
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/build-static.ts +3 -5
- package/lib/server/routes/static.ts +1 -1
- package/package.json +1 -1
package/build-static.ts
CHANGED
|
@@ -675,10 +675,6 @@ export async function buildStaticPages(): Promise<void> {
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
|
|
678
|
-
// _headers generation is deferred until after components and pages are loaded
|
|
679
|
-
// so that library CDN domains can be auto-added to CSP
|
|
680
|
-
const hasCustomHeaders = hostingFiles.includes('_headers');
|
|
681
|
-
|
|
682
678
|
// Copy .well-known directory if exists
|
|
683
679
|
const wellKnownDir = join(projectPaths.project, '.well-known');
|
|
684
680
|
if (existsSync(wellKnownDir)) {
|
|
@@ -756,7 +752,9 @@ export async function buildStaticPages(): Promise<void> {
|
|
|
756
752
|
}
|
|
757
753
|
|
|
758
754
|
// Generate _headers from CSP config, auto-including library CDN domains
|
|
759
|
-
|
|
755
|
+
// Always regenerate when CSP config exists — overwrites any stale _headers file
|
|
756
|
+
// that may have been copied from the project root
|
|
757
|
+
{
|
|
760
758
|
await configService.load();
|
|
761
759
|
const cspConfig = configService.getCSP();
|
|
762
760
|
if (cspConfig && Object.keys(cspConfig).length > 0) {
|
|
@@ -71,7 +71,7 @@ export async function handleStaticRoute(url: URL): Promise<Response | undefined>
|
|
|
71
71
|
// Other static files (editor assets) resolve relative to package root
|
|
72
72
|
let filePath: string;
|
|
73
73
|
let rootPath: string;
|
|
74
|
-
if (decodedPathname.startsWith('/fonts/') || decodedPathname.startsWith('/images/') || decodedPathname.startsWith('/icons/') || decodedPathname.startsWith('/assets/')) {
|
|
74
|
+
if (decodedPathname.startsWith('/fonts/') || decodedPathname.startsWith('/images/') || decodedPathname.startsWith('/icons/') || decodedPathname.startsWith('/assets/') || decodedPathname.startsWith('/libraries/')) {
|
|
75
75
|
rootPath = getProjectRoot();
|
|
76
76
|
filePath = resolveProjectPath(decodedPathname.slice(1)); // Remove leading /
|
|
77
77
|
} else {
|