Skip to main content

Direct Response

Summary

Direct Response instructs Pomerium to send a static HTTP response to the downstream client for a managed route.

How to configure

Config file keysTypeUsage
responseobjectoptional
response.statusintegeroptional
response.bodystringoptional

Example

The response configuration key must replace the to: destination URL in a route block:

routes:
- from: https://example.com
response:
status: 200
body: 'plain text'

Additional HTTP response headers, such as Content-Type, can be defined with the set_response_headers setting:

routes:
- from: https://example.com
response:
status: 200
body: "plain text"
set_response_headers:
Content-Type: "text/plain; charset=us-ascii"