1. Proxies and Flow

serviceProxy

Version

A proxy server sits between clients and a backend: it accepts requests, forwards them to the real server, and returns the response, so clients see only the gateway's address while the target stays concealed behind it. The serviceProxy is Membrane's most basic proxy. It accepts HTTP requests on a port, optionally matched by host, path and method, runs them through the configured flow of plugins, and forwards them to a target. The other proxies build on it for specific protocols: api adds REST and OpenAPI support, soapProxy exposes SOAP Web Services from a WSDL.

Example Configuration

serviceProxy:
port: 2000
target:
url: https://www.predic8.de
serviceProxy:
   port: 2000
   target:
     url: https://www.predic8.de

Syntax

serviceProxy:
'$ref': <string>
flow:
- <flow>
host: <string>
ip: <string>
method: <string>
name: <string>
path: {}
port: <number>
ssl: {}
target: {}
serviceProxy:
  '$ref': <string>
  flow:
    - <flow>
  host: <string>
  ip: <string>
  method: <string>
  name: <string>
  path: {}
  port: <number>
  ssl: {}
  target: {}

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
hostfalsenot setRestricts to requests whose Host header matches one of the given hostnames. Separate multiple hostnames with spaces. The asterisk * matches any number of characters, including zero, for basic globbing.predic8.de *.predic8.de
ipfalsenot setIf present, binds the port only on the specified IP. Useful for hosts with multiple IP addresses.127.0.0.1
methodfalse*Restricts this proxy to requests whose HTTP method (GET, POST, etc.) matches. The asterisk * matches any method.GET
namefalseBy default, a name will be automatically generated from the target host, port, etc.The name as shown in the Admin Console.-
portfalse80The port Membrane listens on for incoming connections.8080

Child Structure

ElementCardinalityDescription
flow0..*
path0..1Restricts to requests whose path matches, either by prefix (starts-with) or, when enabled, by regular expression. In a soapProxy, setting a path also rewrites the paths of SOAP requests and the service addresses in the WSDL accordingly.
ssl0..1Configures inbound or outbound SSL connections.
target0..1The backend server that requests are forwarded to after passing through the flow.

Can be used in