Skip to main content
Deno 2 is finally here 🎉️
Learn more

fresh_brick_wall_middleware

fresh_brick_wall_middleware is the module for Fresh that checks that the communication passed through Brick Wall.

Setup

// routes/_middleware.ts
import { brickWallHandler } from "https://deno.land/x/fresh_brick_wall_middleware/mod.ts";

export const handler = [brickWallHandler];

And env.

BRICK_WALL_JWT_KEY=XXXXXXXXXXXXX
BRICK_WALL_HASHED_PASSWORD=[hashed password]

BRICK_WALL_JWT_KEY is generate key from crypto.subtle.generateKey. BRICK_WALL_HASHED_PASSWORD is hash from bcrypt.

Reference

https://deno.land/x/fresh_brick_wall_middleware