two-stroke 4.1.1 → 4.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/index.ts +2 -2
package/package.json CHANGED
@@ -51,7 +51,7 @@
51
51
  "name": "two-stroke",
52
52
  "packageManager": "yarn@4.3.0",
53
53
  "type": "module",
54
- "version": "4.1.1",
54
+ "version": "4.1.2",
55
55
  "devDependencies": {
56
56
  "@types/eslint": "^9.6.1",
57
57
  "@types/node": "^22.8.1",
package/src/index.ts CHANGED
@@ -272,9 +272,9 @@ export function twoStroke<T extends Env>(title: string, release: string) {
272
272
  },
273
273
  noAuth,
274
274
  pbkdf:
275
- (k: keyof T) =>
275
+ (k: keyof T, customHeaderName: string = "Authorization") =>
276
276
  async ({ req, env }: { req: Request; env: T }) => {
277
- const [scheme, token] = (req.headers.get("Authorization") ?? " ").split(
277
+ const [scheme, token] = (req.headers.get(customHeaderName) ?? " ").split(
278
278
  " ",
279
279
  );
280
280
  if (