📗
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
  2. Request URI

The append_path property

You might also want to always append the listen_path to the elected upstream target. To do so, use the append_path boolean property by configuring an API like this:

{
    "name": "My API",
    "proxy": {
        "append_path" : true,
        "listen_path": "/service/*",
        "upstreams" : {
            "balancing": "roundrobin",
            "targets": [
                {"target": "http://my-api.com/example"}
            ]
        },
    }
}

Enabling this flag instructs Janus that when proxying this API, it should always include the matching URI prefix in the upstream request's URI. For example, the following client's request to the API configured as above:

GET /service/path/to/resource HTTP/1.1
Host: my-api.com

Will cause Janus to send the following request to your upstream service:

GET /example/service/path/to/resource HTTP/1.1
Host: my-api.com
PreviousThe strip_path propertyNextRequest HTTP method

Last updated 4 years ago

Was this helpful?