import "../keywords-CY7Q7l2u.js";
import { a as hstsFactory, i as csrfFactory, n as noSniffFactory, r as cspFactory, t as frameGuardFactory } from "../frame_guard-yu-WWHZp.js";
import "./guards/main.js";
var ShieldMiddleware = class {
	#guards = [];
	constructor(config, encryption, edge) {
		this.#guards = [
			csrfFactory(config.csrf || {}, encryption, edge),
			cspFactory(config.csp || {}),
			frameGuardFactory(config.xFrame || {}),
			hstsFactory(config.hsts || {}),
			noSniffFactory(config.contentTypeSniffing || {})
		];
	}
	async handle(ctx, next) {
		for (let action of this.#guards) await action(ctx);
		await next();
	}
};
export { ShieldMiddleware as default };
