From: Ardis Lu Date: Fri, 7 Jun 2024 05:01:22 +0000 (-0700) Subject: Fetch from "/template" instead of "/template.html" X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=1f3d8c333de188006923df237cadb8e2deda8d5a;p=static-encrypt Fetch from "/template" instead of "/template.html" Otherwise, Cloudflare Pages will waste time with a redirection. --- diff --git a/README.md b/README.md index bc2d0f8..87a79d1 100644 --- a/README.md +++ b/README.md @@ -95,3 +95,11 @@ tsc --declaration --emitDeclarationOnly --allowJs .\decrypt.js .\encrypt.js ``` These `*.d.ts` files allow `encrypt` and `decrypt` to be imported in `.ts` files with typing. + +## Local testing + +Host the files on any web host configured to serve static files and add a default file extension of `.html` to plain paths. For example, using [local-web-server](https://github.com/lwsjs/local-web-server/): + +``` +ws --static.extensions html +``` diff --git a/index.html b/index.html index bd38674..97acffc 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + static-encrypt