Comparing version 0.3.0 to 0.4.0
@@ -41,20 +41,21 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const headers = { | ||
'Content-Encoding': 'utf8' | ||
}; | ||
const headers = {}; | ||
switch (extname) { | ||
case '.html': | ||
headers['Content-Type'] = 'text/html'; | ||
case '.css': | ||
headers['Content-Type'] = 'text/css; charset=utf-8'; | ||
break; | ||
case '.htm': | ||
headers['Content-Type'] = 'text/html'; | ||
headers['Content-Type'] = 'text/html; charset=utf-8'; | ||
break; | ||
case '.html': | ||
headers['Content-Type'] = 'text/html; charset=utf-8'; | ||
break; | ||
case '.js': | ||
headers['Content-Type'] = 'text/javascript'; | ||
headers['Content-Type'] = 'text/javascript; charset=utf-8'; | ||
break; | ||
case '.css': | ||
headers['Content-Type'] = 'text/css'; | ||
case '.json': | ||
headers['Content-Type'] = 'application/json; charset=utf-8'; | ||
break; | ||
case '.ttf': | ||
headers['Content-Type'] = 'font/ttf'; | ||
case '.png': | ||
headers['Content-Type'] = 'image/png'; | ||
break; | ||
@@ -64,2 +65,8 @@ case '.svg': | ||
break; | ||
case '.ttf': | ||
headers['Content-Type'] = 'font/ttf'; | ||
break; | ||
case '.txt': | ||
headers['Content-Type'] = 'text/plain; charset=utf-8'; | ||
break; | ||
case '.wasm': | ||
@@ -66,0 +73,0 @@ headers['Content-Type'] = 'application/wasm'; |
{ | ||
"name": "yaserver", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Yet Another Server", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12763
257