Security header middleware collection for Koa applications that wraps Helmet.js
91
Build middleware for a Koa application that enforces HTTPS security policies on different routes.
Create a Koa application with security middleware that enforces HTTPS by instructing browsers to only use secure connections.
Apply a default HTTPS enforcement policy to all routes with the following requirements:
Implement different HTTPS enforcement policies for specific routes:
Admin routes (paths starting with /admin):
Development routes (paths starting with /dev):
All other routes should use the default 90-day policy.
@generates
import Koa from 'koa';
/**
* Creates and configures a Koa application with HTTPS enforcement policies
*
* @returns Configured Koa application instance with route-specific HTTPS policies
*/
export function createApp(): Koa;Provides the web application framework.
Provides security header middleware for HTTPS enforcement.
Install with Tessl CLI
npx tessl i tessl/npm-koa-helmetdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10