BaseUriDecorator
Overrides the scheme, host, and port of the existing request URI, rebasing the URI and so making requests relative to a new base URI. Rebasing changes only the scheme, host, and port of the request URI. Rebasing does not affect the path, query string, or fragment.
Decorator Usage
{ "name": string, "type": "BaseUriDecorator" }
A BaseUriDecorator does not have configurable properties.
IG creates a default BaseUriDecorator named baseURI at startup time in the top-level heap, so you can use baseURI as the decorator name without adding the decorator declaration
Decorated Object Usage
{ "name": string, "type": string, "config": object, decorator name: runtime expression<uri string> }
"name"
: string, required except for inline objectsThe unique name of the object, just like an object that is not decorated
"type"
: string, requiredThe class name of the decorated object, which must be either a Filter or a Handler.
"config"
: object, required unless emptyThe configuration of the object, just like an object that is not decorated
- decorator name: runtime expression<uri string>, required
The scheme, host, and port of the new base URI. The port is optional when using the defaults (80 for HTTP, 443 for HTTPS).
The value of the string must not contain underscores, and must conform to the syntax specified in RFC 3986.
Examples
Add a custom decorator to the heap named myBaseUri:
{ "name": "myBaseUri", "type": "BaseUriDecorator" }
Set a Router's base URI to https://www.example.com:8443
:
{ "name": "Router", "type": "Router", "myBaseUri": "https://www.example.com:8443/" }