spooder 5.1.1 → 5.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.ts +1 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spooder",
3
3
  "type": "module",
4
- "version": "5.1.1",
4
+ "version": "5.1.2",
5
5
  "module": "./src/api.ts",
6
6
  "bin": {
7
7
  "spooder": "./src/cli.ts"
package/src/api.ts CHANGED
@@ -1589,8 +1589,7 @@ export function http_serve(port: number, hostname?: string) {
1589
1589
  if (stat.isDirectory())
1590
1590
  return 401; // Unauthorized
1591
1591
 
1592
- const ext = path.extname(file_path);
1593
- if (static_options.sub_ext?.includes(ext)) {
1592
+ if (static_options.sub_ext?.some(ext => file_path.endsWith(ext))) {
1594
1593
  const content = await parse_template(await file.text(), global_sub_table, true);
1595
1594
  return new Response(content, {
1596
1595
  headers: {