3. Security and Validation

header

Version

Extracts an API key from a specific HTTP request header. By default, the header name is X-Api-Key. If the header is present, its first value is returned as the API key.

Example usage inside <apiKey>:

apiKey:
extractors:
- header: x-key # custom header name
apiKey:
  extractors:
    - header: x-key # custom header name

Syntax

headerExtractor: <string>
headerExtractor: <string>

Can be used in