For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
        • AuthHandler
        • ConfigLoader
        • Environment Variables
        • Logging
        • PromptManager
        • SchemaUtils
        • ServerlessAdapter
        • SessionManager
        • SslConfig
          • getCert
          • getHstsHeader
          • getKey
          • getServerOptions
          • hstsMiddleware
          • isConfigured
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Parameters
  • Returns
  • Example
AgentsConfigurationSslConfig

hstsMiddleware

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

isConfigured

Next
Built with

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

1import { SslConfig } from '@signalwire/sdk';
2import { Hono } from 'hono';
3
4const ssl = new SslConfig({ enabled: true });
5const app = new Hono();
6app.use('*', ssl.hstsMiddleware());