📗
Janus Manual
  • Introduction
  • Installation
    • Docker
  • Quick Start
    • Authenticating
    • Add an endpoint
    • Modify (Update/Delete) an endpoint
    • Add Plugins
    • Authentication
    • Adding your API - File System
  • Clustering/HA
  • Proxy Reference
    • Terminology
    • Overview
    • Routing capabilities
    • Load Balacing
    • Request Host header
      • Using wildcard hostnames
      • The preserve_host property
    • Request URI
      • The strip_path property
      • The append_path property
    • Request HTTP method
    • Routing priorities
    • Conclusion
  • Plugins
    • Basic
    • Organization
    • Body Limit
    • Circuit Breaker
    • Compression
    • CORS
    • OAuth
    • Rate Limit
    • Request Transformer
    • Response Transformer
    • Retry
  • Auth
    • OAuth 2.0
  • Misc
    • Health Checks
    • Monitoring
    • Tracing
  • Known Issues
    • Stale HTTP Keep-Alive
  • Upgrade Notes
    • 2.x to 3.x
    • 3.6.x to 3.7.x
Powered by GitBook
On this page

Was this helpful?

  1. Proxy Reference

Request Host header

Routing a request based on its Host header is the most straightforward way to proxy traffic through Janus, as this is the intended usage of the HTTP Host header. Janus makes it easy to do so via the hosts field of the API entity.

hosts accepts multiple values, which must be in an array format when specifying them via the Admin API:

{
    "hosts": ["my-api.com", "example.com", "service.com"]
}

To satisfy the hosts condition of this API, any incoming request from a client must now have its Host header set to one of:

Host: my-api.com

or:

Host: example.com

or:

Host: service.com
PreviousLoad BalacingNextUsing wildcard hostnames

Last updated 4 years ago

Was this helpful?