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.
- package/package.json +1 -1
- package/src/api.ts +1 -2
package/package.json
CHANGED
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
|
-
|
|
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: {
|