1// F:\zApps\valtown.servers\APIServer\src\middleware\res.headers.ts
2
3import { Context, Next } from "hono";
1// F:\zApps\valtown.servers\APIServer\src\middleware\req.query.ts
2import { Context, Next } from "hono";
3import { validator } from "hono/validator";
1// F:\zApps\valtown.servers\APIServer\src\middleware\req.input.filter.ts
2import { Context, Next } from "hono";
3import { HTTPException } from "hono/http-exception";
1// F:\zApps\valtown.servers\APIServer\src\middleware\req.headers.ts
2import { Context, Next } from "hono";
3import { secureHeaders } from "hono/secure-headers";
5 * Provides type-safe validation for login, workflow, hash, and configuration requests.
6 *
7 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\56.Validation.md} Hono Validation
8 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
9 * @author Val.town Server Infrastructure Team
10 * @version 2.0.0
99 * @returns HTTPException - Formatted 400 Bad Request exception with error details
100 *
101 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
102 */
103const createValidationError = (errors: ValidationError[]): HTTPException => {
127 * @throws HTTPException - 400 Bad Request with detailed validation errors if invalid
128 *
129 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\56.Validation.md} Hono Validation
130 */
131export const validateLogin = validator(
1// F:\zApps\valtown.servers\APIServer\src\middleware\rate.limiter.ts
2import { Context, Next } from "hono";
3import { HTTPException } from "hono/http-exception";
1// F:\zApps\valtown.servers\APIServer\src\middleware\logging.ts
2
3import { APP_CONFIG } from "../core/appConfig.ts";
6 * Includes error building utilities for middleware use.
7 *
8 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
9 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\82.Context.md} Hono Context API
10 * @author Val.town Server Infrastructure Team
11 * @version 2.1.0
101 * @returns void - Configures the error handler on the provided app instance
102 *
103 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
104 */
105export const setupErrorHandler = (app: HonoErrorApp) => {
179 * @throws HTTPException - Always throws with provided status and formatted message
180 *
181 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
182 */
183export const throwHTTPError = (
223 * @throws HTTPException - Converts all errors to HTTPException format for global handler
224 *
225 * @see {@link file://F:\secure-web-guardian-api\.docs\Hono_documentation\83.Exception.md} Hono Exception Handling
226 */
227export const errorHandlerMiddleware = async (
1// F:\zApps\valtown.servers\APIServer\src\middleware\csrf.ts
2
3import { Context, Next } from "hono";
1// F:\zApps\valtown.servers\APIServer\src\middleware\browserChain.ts
2/**
3 * Browser-to-backend middleware chain