@louise-toolkit/astro 0.8.0 → 0.9.0

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.
@@ -38,6 +38,13 @@ export function createLouiseMiddleware(config) {
38
38
  // Rate-limit the public, unauthenticated POST surfaces before any other
39
39
  // work. Keyed by client IP via a KV counter; `rateLimit` fails open on a KV
40
40
  // error so a limiter outage never takes down sign-in or the contact form.
41
+ //
42
+ // Astro decodes the path and collapses duplicate slashes before it builds
43
+ // `context.url`, but with the default `trailingSlash: "ignore"` it routes
44
+ // `/api/checkout/` to the `/api/checkout` endpoint and leaves the slash in
45
+ // `pathname`. `matchRateRule` tests each rule against the normalized path
46
+ // too, so an exact rule still limits the slashed spelling, and both count
47
+ // against one budget, since the bucket is keyed by the rule's name.
41
48
  if (config.rateLimit) {
42
49
  const rule = matchRateRule(config.rateLimit.rules, context.request.method, context.url.pathname);
43
50
  if (rule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@louise-toolkit/astro",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Astro adapter for louise-toolkit: middleware, Actions, content-layer loaders, and the forms schema bridge.",
5
5
  "keywords": [
6
6
  "astro",
@@ -35,7 +35,7 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "louise-toolkit": "0.42.0"
38
+ "louise-toolkit": "0.43.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@cloudflare/workers-types": "^5.20260829.1",