lambder 3.2.5 → 3.2.6

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.
@@ -16,6 +16,11 @@ export const createContext = (event, lambdaContext, apiPath) => {
16
16
  if (isV2HttpEvent(event)) {
17
17
  host = headers.host || event.requestContext.domainName || "";
18
18
  path = event.rawPath;
19
+ // Named stages (non-$default) are included in rawPath; v1 strips them.
20
+ const stage = event.requestContext.stage;
21
+ if (stage && stage !== "$default" && (path === `/${stage}` || path.startsWith(`/${stage}/`))) {
22
+ path = path.slice(stage.length + 1) || "/";
23
+ }
19
24
  method = event.requestContext.http.method;
20
25
  get = {};
21
26
  for (const [key, value] of new URLSearchParams(event.rawQueryString ?? "").entries()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambder",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",