two-stroke 5.8.0 → 6.0.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.
- package/package.json +1 -1
- package/src/index.ts +6 -2
- package/src/open-api.ts +1 -1
- package/src/test.ts +1 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { verify as jwkVerify } from "jwk-subtle";
|
|
2
2
|
import { verify as pbkdfVerify } from "pbkdf-subtle";
|
|
3
3
|
import { Toucan } from "toucan-js";
|
|
4
|
-
import { ZodSafeParseResult, ZodObject, z, ZodType } from "zod/v4";
|
|
4
|
+
import { type ZodSafeParseResult, ZodObject, z, ZodType } from "zod/v4";
|
|
5
5
|
import { openAPI } from "./open-api";
|
|
6
|
-
import { Env, Handler, Route } from "./types";
|
|
6
|
+
import { type Env, type Handler, type Route } from "./types";
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
9
9
|
const noAuth = async () => null;
|
|
@@ -196,6 +196,10 @@ export function twoStroke<T extends Env>(
|
|
|
196
196
|
Object.entries({
|
|
197
197
|
...defaultHeaders,
|
|
198
198
|
"Content-Type": "application/json",
|
|
199
|
+
"Strict-Transport-Security":
|
|
200
|
+
"max-age=15552000; includeSubDomains",
|
|
201
|
+
"X-Content-Type-Options": "nosniff",
|
|
202
|
+
"Content-Security-Policy": "default-src 'self'",
|
|
199
203
|
}).forEach(([k, v]) => {
|
|
200
204
|
if (!responseWithHeaders.headers.has(k))
|
|
201
205
|
responseWithHeaders.headers.set(k, v);
|
package/src/open-api.ts
CHANGED
package/src/test.ts
CHANGED