Add code reference links and backticks to JSDoc comments (#1484)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
This commit is contained in:
parent
91f6a277c4
commit
42b335953a
2 changed files with 400 additions and 400 deletions
|
|
@ -8,8 +8,8 @@ import { hostHeaderValidation, localhostHostValidation } from './middleware/host
|
|||
*/
|
||||
export interface CreateMcpHonoAppOptions {
|
||||
/**
|
||||
* The hostname to bind to. Defaults to '127.0.0.1'.
|
||||
* When set to '127.0.0.1', 'localhost', or '::1', DNS rebinding protection is automatically enabled.
|
||||
* The hostname to bind to. Defaults to `'127.0.0.1'`.
|
||||
* When set to `'127.0.0.1'`, `'localhost'`, or `'::1'`, DNS rebinding protection is automatically enabled.
|
||||
*/
|
||||
host?: string;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export interface CreateMcpHonoAppOptions {
|
|||
/**
|
||||
* Creates a Hono application pre-configured for MCP servers.
|
||||
*
|
||||
* When the host is '127.0.0.1', 'localhost', or '::1' (the default is '127.0.0.1'),
|
||||
* When the host is `'127.0.0.1'`, `'localhost'`, or `'::1'` (the default is `'127.0.0.1'`),
|
||||
* DNS rebinding protection middleware is automatically applied to protect against
|
||||
* DNS rebinding attacks on localhost servers.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { MiddlewareHandler } from 'hono';
|
|||
|
||||
/**
|
||||
* Hono middleware for DNS rebinding protection.
|
||||
* Validates Host header hostname (port-agnostic) against an allowed list.
|
||||
* Validates `Host` header hostname (port-agnostic) against an allowed list.
|
||||
*/
|
||||
export function hostHeaderValidation(allowedHostnames: string[]): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
|
|
@ -26,7 +26,7 @@ export function hostHeaderValidation(allowedHostnames: string[]): MiddlewareHand
|
|||
}
|
||||
|
||||
/**
|
||||
* Convenience middleware for localhost DNS rebinding protection.
|
||||
* Convenience middleware for `localhost` DNS rebinding protection.
|
||||
*/
|
||||
export function localhostHostValidation(): MiddlewareHandler {
|
||||
return hostHeaderValidation(localhostAllowedHostnames());
|
||||
|
|
|
|||
Loading…
Reference in a new issue