mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-01-12 23:32:55 +01:00
fix(preview): add missing font MIME types to web server
- Added MIME type mappings for .otf, .woff, and .woff2 font formats - Fixed missing break statement after .wav case (was falling through to .mp4) - Fonts now load correctly in editor preview without 404 errors - Resolves OTS parsing error messages in console The web server was already serving project directory files correctly, but browsers were rejecting font files due to missing/incorrect MIME types. Related to TASK-006
This commit is contained in:
@@ -302,7 +302,7 @@ function getContentType(request) {
|
||||
break;
|
||||
case '.wav':
|
||||
contentType = 'audio/wav';
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
break;
|
||||
case '.mp4':
|
||||
case '.m4v':
|
||||
contentType = 'video/mp4';
|
||||
@@ -316,6 +316,15 @@ function getContentType(request) {
|
||||
case '.ttf':
|
||||
contentType = 'font/ttf';
|
||||
break;
|
||||
case '.otf':
|
||||
contentType = 'font/otf';
|
||||
break;
|
||||
case '.woff':
|
||||
contentType = 'font/woff';
|
||||
break;
|
||||
case '.woff2':
|
||||
contentType = 'font/woff2';
|
||||
break;
|
||||
}
|
||||
|
||||
return contentType;
|
||||
|
||||
Reference in New Issue
Block a user