ProxyOptions
A proxy to which a ClientHandler or ReverseProxyHandler can submit requests, and an AmService can submit Websocket notifications.
Use this object to configure a proxy for AM notifications, and use it in a ClientHandler or ReverseProxyHandler, and again in an AmService notifications block.
Usage
Use one of the following ProxyOption types with the proxyOptions option of
ClientHandler, ReverseProxyHandler, and
AmService:
- 
No proxy.
{ "name": string, "type": "NoProxyOptions" } - 
System defined proxy options.
{ "name": string, "type": "SystemProxyOptions" } - 
Custom proxy
{ "name": string, "type": "CustomProxyOptions", "config": { "uri": configuration expression<url>, "username": configuration expression<string>, "passwordSecretId": configuration expression<secret-id>, "secretsProvider": SecretsProvider reference } } 
Default: NoProxyOptions
Properties
"uri": configuration expression<url>, required- 
URI of a server to use as a proxy for outgoing requests.
The result of the expression must be a string that represents a valid URI, but is not a real
java.net.URIobject. "username": configuration expression<string>, required if the proxy requires authentication- 
Username to access the proxy server.
 "passwordSecretId": configuration expression<secret-id>, required if the proxy requires authentication- 
The secret ID of the password to access the proxy server.
 "secretsProvider": _ SecretsProvider <reference>, optional_- 
The SecretsProvider to query for the proxy’s password. For more information, see SecretsProvider.
 
Example
In the following example, the handler passes outgoing requests to the proxy server, which requires authentication:
"handler": {
  "type": "ClientHandler" or "ReverseProxyHandler",
  "config": {
     "proxyOptions": {
       "type": "CustomProxyOptions",
       "config": {
          "uri": "http://proxy.example.com:3128",
          "username": "proxyuser",
          "passwordSecretId": "myproxy.secret.id",
          "secretsProvider": "SystemAndEnvSecretStore"
       }
    }
  }
}
In the following example, the AmService notification service passes Websocket notifications to the proxy server, which requires authentication:
"type": "AmService",
   "config": {
     ...
     "notifications": {
       "proxyOptions": {
         "type": "CustomProxyOptions",
         "config": {
           "uri": "http://proxy.example.com:3128",
           "username": "proxyuser",
           "passwordSecretId": "myproxy.secret.id",
           "secretsProvider": "SystemAndEnvSecretStore"
         }
      }
    }
  }
}