***

title: hstsMiddleware
slug: /reference/typescript/agents/configuration/ssl-config/hsts-middleware
description: Hono middleware that appends HSTS headers to responses.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Return a Hono-compatible middleware that appends the `Strict-Transport-Security`
header to every response.

## **Parameters**

None.

## **Returns**

`(c: any, next: () => Promise<void>) => Promise<void>` -- A Hono middleware function.

## **Example**

```typescript {6}
import { SslConfig } from '@signalwire/sdk';
import { Hono } from 'hono';

const ssl = new SslConfig({ enabled: true });
const app = new Hono();
app.use('*', ssl.hstsMiddleware());
```