Spec-Zone.ru › Caddy

abort

Prevents any response to the client by immediately aborting the HTTP handler chain and closing the connection. Any concurrent, active HTTP streams on the same connection are interrupted.

Syntax

abort [<matcher>]

Examples

Forcefully close a connection received for unknown domains when using a wildcard certificate:

*.example.com {
    @foo host foo.example.com
    handle @foo {
        respond "This is foo!" 200
    }
    handle {		# Unhandled domains fall through to here,
		# but we don't want to accept their requests
        abort
    }
}

© 2015-2025 Matthew Holt and The Caddy Authors
Licensed under the Apache License 2.0.
Caddy is a registered trademark of Stack Holdings GmbH.
https://caddyserver.com/docs/caddyfile/directives/abort

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API