@bbloker/sdk 0.1.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.
@@ -0,0 +1,64 @@
1
+ import {
2
+ Bbloker
3
+ } from "../chunk-6P6B2RO7.js";
4
+
5
+ // src/adapters/fastify.ts
6
+ function createPlugin(config) {
7
+ const bbloker = new Bbloker(config);
8
+ return function bblokerPlugin(fastify, _opts, done) {
9
+ fastify.addHook("onRequest", (request, reply, hookDone) => {
10
+ const normalized = normalizeFastifyRequest(request);
11
+ const decision = bbloker.analyze(normalized);
12
+ if (decision.action === "block") {
13
+ if (config.onBlock) {
14
+ const result = config.onBlock({
15
+ fingerprint: {
16
+ ip: normalized.ip,
17
+ userAgent: normalized.userAgent,
18
+ headerOrder: normalized.headerNames,
19
+ headers: normalized.headers,
20
+ path: normalized.path,
21
+ method: normalized.method,
22
+ ts: Date.now()
23
+ },
24
+ decision
25
+ });
26
+ if (result instanceof Promise) {
27
+ result.then(() => {
28
+ reply.status(403).send();
29
+ });
30
+ return;
31
+ }
32
+ }
33
+ reply.status(403).send();
34
+ return;
35
+ }
36
+ hookDone();
37
+ });
38
+ done();
39
+ };
40
+ }
41
+ function normalizeFastifyRequest(req) {
42
+ const rawHeaders = req.headers;
43
+ const headers = {};
44
+ const headerNames = [];
45
+ for (const [key, value] of Object.entries(rawHeaders)) {
46
+ const lower = key.toLowerCase();
47
+ headers[lower] = Array.isArray(value) ? value.join(", ") : value ?? "";
48
+ headerNames.push(lower);
49
+ }
50
+ const forwarded = headers["x-forwarded-for"]?.split(",")[0]?.trim();
51
+ const ip = req.ip ?? forwarded ?? "0.0.0.0";
52
+ return {
53
+ ip,
54
+ userAgent: headers["user-agent"] ?? "",
55
+ headers,
56
+ headerNames,
57
+ path: req.url ?? "/",
58
+ method: req.method ?? "GET"
59
+ };
60
+ }
61
+ export {
62
+ Bbloker,
63
+ createPlugin
64
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkKT5GDIXHcjs = require('../chunk-KT5GDIXH.cjs');
4
+
5
+ // src/adapters/hono.ts
6
+ function createMiddleware(config) {
7
+ const bbloker = new (0, _chunkKT5GDIXHcjs.Bbloker)(config);
8
+ return async function middleware(c, next) {
9
+ const normalized = normalizeHonoRequest(c);
10
+ const decision = bbloker.analyze(normalized);
11
+ if (decision.action === "block") {
12
+ if (config.onBlock) {
13
+ const result = await config.onBlock({
14
+ fingerprint: {
15
+ ip: normalized.ip,
16
+ userAgent: normalized.userAgent,
17
+ headerOrder: normalized.headerNames,
18
+ headers: normalized.headers,
19
+ path: normalized.path,
20
+ method: normalized.method,
21
+ ts: Date.now()
22
+ },
23
+ decision
24
+ });
25
+ if (result instanceof Response) return result;
26
+ }
27
+ return c.text("Forbidden", 403);
28
+ }
29
+ await next();
30
+ };
31
+ }
32
+ function normalizeHonoRequest(c) {
33
+ const headers = {};
34
+ const headerNames = [];
35
+ c.req.raw.headers.forEach((value, key) => {
36
+ const lower = key.toLowerCase();
37
+ headers[lower] = value;
38
+ headerNames.push(lower);
39
+ });
40
+ const forwarded = _optionalChain([headers, 'access', _ => _["x-forwarded-for"], 'optionalAccess', _2 => _2.split, 'call', _3 => _3(","), 'access', _4 => _4[0], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]);
41
+ const cfIp = headers["cf-connecting-ip"];
42
+ const ip = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(cfIp, () => ( forwarded)), () => ( headers["x-real-ip"])), () => ( "0.0.0.0"));
43
+ return {
44
+ ip,
45
+ userAgent: _nullishCoalesce(headers["user-agent"], () => ( "")),
46
+ headers,
47
+ headerNames,
48
+ path: c.req.path,
49
+ method: c.req.method
50
+ };
51
+ }
52
+
53
+
54
+
55
+ exports.Bbloker = _chunkKT5GDIXHcjs.Bbloker; exports.createMiddleware = createMiddleware;
@@ -0,0 +1,32 @@
1
+ import { BblokerConfig } from '../index.cjs';
2
+ export { Bbloker } from '../index.cjs';
3
+
4
+ type HonoContext = {
5
+ req: {
6
+ raw: Request;
7
+ header(name: string): string | undefined;
8
+ path: string;
9
+ method: string;
10
+ };
11
+ header(name: string): string | undefined;
12
+ text(body: string, status?: number): Response;
13
+ };
14
+ type HonoNext = () => Promise<void>;
15
+ /**
16
+ * Create Hono middleware that blocks AI crawlers.
17
+ * Works on Cloudflare Workers, Deno, Bun, Node.
18
+ *
19
+ * Usage:
20
+ * ```ts
21
+ * import { Hono } from 'hono';
22
+ * import { createMiddleware } from '@bbloker/sdk/hono';
23
+ *
24
+ * const app = new Hono();
25
+ * app.use('*', createMiddleware({
26
+ * apiKey: process.env.BBLOKER_API_KEY!,
27
+ * }));
28
+ * ```
29
+ */
30
+ declare function createMiddleware(config: BblokerConfig): (c: HonoContext, next: HonoNext) => Promise<Response | undefined>;
31
+
32
+ export { BblokerConfig, createMiddleware };
@@ -0,0 +1,32 @@
1
+ import { BblokerConfig } from '../index.js';
2
+ export { Bbloker } from '../index.js';
3
+
4
+ type HonoContext = {
5
+ req: {
6
+ raw: Request;
7
+ header(name: string): string | undefined;
8
+ path: string;
9
+ method: string;
10
+ };
11
+ header(name: string): string | undefined;
12
+ text(body: string, status?: number): Response;
13
+ };
14
+ type HonoNext = () => Promise<void>;
15
+ /**
16
+ * Create Hono middleware that blocks AI crawlers.
17
+ * Works on Cloudflare Workers, Deno, Bun, Node.
18
+ *
19
+ * Usage:
20
+ * ```ts
21
+ * import { Hono } from 'hono';
22
+ * import { createMiddleware } from '@bbloker/sdk/hono';
23
+ *
24
+ * const app = new Hono();
25
+ * app.use('*', createMiddleware({
26
+ * apiKey: process.env.BBLOKER_API_KEY!,
27
+ * }));
28
+ * ```
29
+ */
30
+ declare function createMiddleware(config: BblokerConfig): (c: HonoContext, next: HonoNext) => Promise<Response | undefined>;
31
+
32
+ export { BblokerConfig, createMiddleware };
@@ -0,0 +1,55 @@
1
+ import {
2
+ Bbloker
3
+ } from "../chunk-6P6B2RO7.js";
4
+
5
+ // src/adapters/hono.ts
6
+ function createMiddleware(config) {
7
+ const bbloker = new Bbloker(config);
8
+ return async function middleware(c, next) {
9
+ const normalized = normalizeHonoRequest(c);
10
+ const decision = bbloker.analyze(normalized);
11
+ if (decision.action === "block") {
12
+ if (config.onBlock) {
13
+ const result = await config.onBlock({
14
+ fingerprint: {
15
+ ip: normalized.ip,
16
+ userAgent: normalized.userAgent,
17
+ headerOrder: normalized.headerNames,
18
+ headers: normalized.headers,
19
+ path: normalized.path,
20
+ method: normalized.method,
21
+ ts: Date.now()
22
+ },
23
+ decision
24
+ });
25
+ if (result instanceof Response) return result;
26
+ }
27
+ return c.text("Forbidden", 403);
28
+ }
29
+ await next();
30
+ };
31
+ }
32
+ function normalizeHonoRequest(c) {
33
+ const headers = {};
34
+ const headerNames = [];
35
+ c.req.raw.headers.forEach((value, key) => {
36
+ const lower = key.toLowerCase();
37
+ headers[lower] = value;
38
+ headerNames.push(lower);
39
+ });
40
+ const forwarded = headers["x-forwarded-for"]?.split(",")[0]?.trim();
41
+ const cfIp = headers["cf-connecting-ip"];
42
+ const ip = cfIp ?? forwarded ?? headers["x-real-ip"] ?? "0.0.0.0";
43
+ return {
44
+ ip,
45
+ userAgent: headers["user-agent"] ?? "",
46
+ headers,
47
+ headerNames,
48
+ path: c.req.path,
49
+ method: c.req.method
50
+ };
51
+ }
52
+ export {
53
+ Bbloker,
54
+ createMiddleware
55
+ };
@@ -0,0 +1,53 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkKT5GDIXHcjs = require('../chunk-KT5GDIXH.cjs');
4
+
5
+ // src/adapters/nextjs.ts
6
+ function createMiddleware(config) {
7
+ const bbloker = new (0, _chunkKT5GDIXHcjs.Bbloker)(config);
8
+ return async function middleware(request) {
9
+ const { NextResponse } = await Promise.resolve().then(() => _interopRequireWildcard(require("next/server")));
10
+ const normalized = normalizeNextRequest(request);
11
+ const decision = bbloker.analyze(normalized);
12
+ if (decision.action === "block") {
13
+ if (config.onBlock) {
14
+ const result = await config.onBlock({
15
+ fingerprint: {
16
+ ip: normalized.ip,
17
+ userAgent: normalized.userAgent,
18
+ headerOrder: normalized.headerNames,
19
+ headers: normalized.headers,
20
+ path: normalized.path,
21
+ method: normalized.method,
22
+ ts: Date.now()
23
+ },
24
+ decision
25
+ });
26
+ if (result instanceof Response) return result;
27
+ }
28
+ return new NextResponse(null, { status: 403 });
29
+ }
30
+ return NextResponse.next();
31
+ };
32
+ }
33
+ function normalizeNextRequest(req) {
34
+ const headers = {};
35
+ const headerNames = [];
36
+ req.headers.forEach((value, key) => {
37
+ const lower = key.toLowerCase();
38
+ headers[lower] = value;
39
+ headerNames.push(lower);
40
+ });
41
+ return {
42
+ ip: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(req.ip, () => ( _optionalChain([headers, 'access', _ => _["x-forwarded-for"], 'optionalAccess', _2 => _2.split, 'call', _3 => _3(","), 'access', _4 => _4[0], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]))), () => ( headers["x-real-ip"])), () => ( "0.0.0.0")),
43
+ userAgent: _nullishCoalesce(headers["user-agent"], () => ( "")),
44
+ headers,
45
+ headerNames,
46
+ path: req.nextUrl.pathname,
47
+ method: req.method
48
+ };
49
+ }
50
+
51
+
52
+
53
+ exports.Bbloker = _chunkKT5GDIXHcjs.Bbloker; exports.createMiddleware = createMiddleware;
@@ -0,0 +1,34 @@
1
+ import { BblokerConfig } from '../index.cjs';
2
+ export { Bbloker } from '../index.cjs';
3
+
4
+ type NextRequest = {
5
+ ip?: string | null;
6
+ headers: {
7
+ get(name: string): string | null;
8
+ forEach(cb: (value: string, key: string) => void): void;
9
+ };
10
+ nextUrl: {
11
+ pathname: string;
12
+ };
13
+ method: string;
14
+ geo?: {
15
+ country?: string;
16
+ };
17
+ };
18
+ /**
19
+ * Create a Next.js middleware that blocks AI crawlers.
20
+ *
21
+ * Usage in middleware.ts:
22
+ * ```ts
23
+ * import { createMiddleware } from '@bbloker/sdk/nextjs';
24
+ *
25
+ * export default createMiddleware({
26
+ * apiKey: process.env.BBLOKER_API_KEY!,
27
+ * });
28
+ *
29
+ * export const config = { matcher: '/((?!_next/static|favicon.ico).*)' };
30
+ * ```
31
+ */
32
+ declare function createMiddleware(config: BblokerConfig): (request: NextRequest) => Promise<Response>;
33
+
34
+ export { BblokerConfig, createMiddleware };
@@ -0,0 +1,34 @@
1
+ import { BblokerConfig } from '../index.js';
2
+ export { Bbloker } from '../index.js';
3
+
4
+ type NextRequest = {
5
+ ip?: string | null;
6
+ headers: {
7
+ get(name: string): string | null;
8
+ forEach(cb: (value: string, key: string) => void): void;
9
+ };
10
+ nextUrl: {
11
+ pathname: string;
12
+ };
13
+ method: string;
14
+ geo?: {
15
+ country?: string;
16
+ };
17
+ };
18
+ /**
19
+ * Create a Next.js middleware that blocks AI crawlers.
20
+ *
21
+ * Usage in middleware.ts:
22
+ * ```ts
23
+ * import { createMiddleware } from '@bbloker/sdk/nextjs';
24
+ *
25
+ * export default createMiddleware({
26
+ * apiKey: process.env.BBLOKER_API_KEY!,
27
+ * });
28
+ *
29
+ * export const config = { matcher: '/((?!_next/static|favicon.ico).*)' };
30
+ * ```
31
+ */
32
+ declare function createMiddleware(config: BblokerConfig): (request: NextRequest) => Promise<Response>;
33
+
34
+ export { BblokerConfig, createMiddleware };
@@ -0,0 +1,53 @@
1
+ import {
2
+ Bbloker
3
+ } from "../chunk-6P6B2RO7.js";
4
+
5
+ // src/adapters/nextjs.ts
6
+ function createMiddleware(config) {
7
+ const bbloker = new Bbloker(config);
8
+ return async function middleware(request) {
9
+ const { NextResponse } = await import("next/server");
10
+ const normalized = normalizeNextRequest(request);
11
+ const decision = bbloker.analyze(normalized);
12
+ if (decision.action === "block") {
13
+ if (config.onBlock) {
14
+ const result = await config.onBlock({
15
+ fingerprint: {
16
+ ip: normalized.ip,
17
+ userAgent: normalized.userAgent,
18
+ headerOrder: normalized.headerNames,
19
+ headers: normalized.headers,
20
+ path: normalized.path,
21
+ method: normalized.method,
22
+ ts: Date.now()
23
+ },
24
+ decision
25
+ });
26
+ if (result instanceof Response) return result;
27
+ }
28
+ return new NextResponse(null, { status: 403 });
29
+ }
30
+ return NextResponse.next();
31
+ };
32
+ }
33
+ function normalizeNextRequest(req) {
34
+ const headers = {};
35
+ const headerNames = [];
36
+ req.headers.forEach((value, key) => {
37
+ const lower = key.toLowerCase();
38
+ headers[lower] = value;
39
+ headerNames.push(lower);
40
+ });
41
+ return {
42
+ ip: req.ip ?? headers["x-forwarded-for"]?.split(",")[0]?.trim() ?? headers["x-real-ip"] ?? "0.0.0.0",
43
+ userAgent: headers["user-agent"] ?? "",
44
+ headers,
45
+ headerNames,
46
+ path: req.nextUrl.pathname,
47
+ method: req.method
48
+ };
49
+ }
50
+ export {
51
+ Bbloker,
52
+ createMiddleware
53
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkKT5GDIXHcjs = require('../chunk-KT5GDIXH.cjs');
4
+
5
+ // src/adapters/node.ts
6
+ function createHandler(config) {
7
+ const bbloker = new (0, _chunkKT5GDIXHcjs.Bbloker)(config);
8
+ return function handler(req, res) {
9
+ const normalized = normalizeNodeRequest(req);
10
+ const decision = bbloker.analyze(normalized);
11
+ if (decision.action === "block") {
12
+ if (config.onBlock) {
13
+ const result = config.onBlock({
14
+ fingerprint: {
15
+ ip: normalized.ip,
16
+ userAgent: normalized.userAgent,
17
+ headerOrder: normalized.headerNames,
18
+ headers: normalized.headers,
19
+ path: normalized.path,
20
+ method: normalized.method,
21
+ ts: Date.now()
22
+ },
23
+ decision
24
+ });
25
+ if (result instanceof Promise) {
26
+ result.catch(() => {
27
+ });
28
+ }
29
+ }
30
+ res.writeHead(403);
31
+ res.end();
32
+ return true;
33
+ }
34
+ return false;
35
+ };
36
+ }
37
+ function normalizeNodeRequest(req) {
38
+ const rawHeaders = req.headers;
39
+ const headers = {};
40
+ const headerNames = [];
41
+ for (const [key, value] of Object.entries(rawHeaders)) {
42
+ const lower = key.toLowerCase();
43
+ headers[lower] = Array.isArray(value) ? value.join(", ") : _nullishCoalesce(value, () => ( ""));
44
+ headerNames.push(lower);
45
+ }
46
+ const forwarded = _optionalChain([headers, 'access', _ => _["x-forwarded-for"], 'optionalAccess', _2 => _2.split, 'call', _3 => _3(","), 'access', _4 => _4[0], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]);
47
+ const ip = _nullishCoalesce(_nullishCoalesce(forwarded, () => ( _optionalChain([req, 'access', _7 => _7.socket, 'optionalAccess', _8 => _8.remoteAddress]))), () => ( "0.0.0.0"));
48
+ return {
49
+ ip,
50
+ userAgent: _nullishCoalesce(headers["user-agent"], () => ( "")),
51
+ headers,
52
+ headerNames,
53
+ path: _nullishCoalesce(req.url, () => ( "/")),
54
+ method: _nullishCoalesce(req.method, () => ( "GET"))
55
+ };
56
+ }
57
+
58
+
59
+
60
+ exports.Bbloker = _chunkKT5GDIXHcjs.Bbloker; exports.createHandler = createHandler;
@@ -0,0 +1,25 @@
1
+ import { BblokerConfig } from '../index.cjs';
2
+ export { Bbloker } from '../index.cjs';
3
+ import { IncomingMessage, ServerResponse } from 'node:http';
4
+
5
+ /**
6
+ * Create a raw Node.js HTTP handler wrapper that blocks AI crawlers.
7
+ *
8
+ * Usage:
9
+ * ```ts
10
+ * import http from 'node:http';
11
+ * import { createHandler } from '@bbloker/sdk/node';
12
+ *
13
+ * const bbloker = createHandler({
14
+ * apiKey: process.env.BBLOKER_API_KEY!,
15
+ * });
16
+ *
17
+ * const server = http.createServer((req, res) => {
18
+ * if (bbloker(req, res)) return; // blocked
19
+ * res.end('Hello');
20
+ * });
21
+ * ```
22
+ */
23
+ declare function createHandler(config: BblokerConfig): (req: IncomingMessage, res: ServerResponse) => boolean;
24
+
25
+ export { BblokerConfig, createHandler };
@@ -0,0 +1,25 @@
1
+ import { BblokerConfig } from '../index.js';
2
+ export { Bbloker } from '../index.js';
3
+ import { IncomingMessage, ServerResponse } from 'node:http';
4
+
5
+ /**
6
+ * Create a raw Node.js HTTP handler wrapper that blocks AI crawlers.
7
+ *
8
+ * Usage:
9
+ * ```ts
10
+ * import http from 'node:http';
11
+ * import { createHandler } from '@bbloker/sdk/node';
12
+ *
13
+ * const bbloker = createHandler({
14
+ * apiKey: process.env.BBLOKER_API_KEY!,
15
+ * });
16
+ *
17
+ * const server = http.createServer((req, res) => {
18
+ * if (bbloker(req, res)) return; // blocked
19
+ * res.end('Hello');
20
+ * });
21
+ * ```
22
+ */
23
+ declare function createHandler(config: BblokerConfig): (req: IncomingMessage, res: ServerResponse) => boolean;
24
+
25
+ export { BblokerConfig, createHandler };
@@ -0,0 +1,60 @@
1
+ import {
2
+ Bbloker
3
+ } from "../chunk-6P6B2RO7.js";
4
+
5
+ // src/adapters/node.ts
6
+ function createHandler(config) {
7
+ const bbloker = new Bbloker(config);
8
+ return function handler(req, res) {
9
+ const normalized = normalizeNodeRequest(req);
10
+ const decision = bbloker.analyze(normalized);
11
+ if (decision.action === "block") {
12
+ if (config.onBlock) {
13
+ const result = config.onBlock({
14
+ fingerprint: {
15
+ ip: normalized.ip,
16
+ userAgent: normalized.userAgent,
17
+ headerOrder: normalized.headerNames,
18
+ headers: normalized.headers,
19
+ path: normalized.path,
20
+ method: normalized.method,
21
+ ts: Date.now()
22
+ },
23
+ decision
24
+ });
25
+ if (result instanceof Promise) {
26
+ result.catch(() => {
27
+ });
28
+ }
29
+ }
30
+ res.writeHead(403);
31
+ res.end();
32
+ return true;
33
+ }
34
+ return false;
35
+ };
36
+ }
37
+ function normalizeNodeRequest(req) {
38
+ const rawHeaders = req.headers;
39
+ const headers = {};
40
+ const headerNames = [];
41
+ for (const [key, value] of Object.entries(rawHeaders)) {
42
+ const lower = key.toLowerCase();
43
+ headers[lower] = Array.isArray(value) ? value.join(", ") : value ?? "";
44
+ headerNames.push(lower);
45
+ }
46
+ const forwarded = headers["x-forwarded-for"]?.split(",")[0]?.trim();
47
+ const ip = forwarded ?? req.socket?.remoteAddress ?? "0.0.0.0";
48
+ return {
49
+ ip,
50
+ userAgent: headers["user-agent"] ?? "",
51
+ headers,
52
+ headerNames,
53
+ path: req.url ?? "/",
54
+ method: req.method ?? "GET"
55
+ };
56
+ }
57
+ export {
58
+ Bbloker,
59
+ createHandler
60
+ };