Skip to main content

Plugin proxies

Overview: how plugin proxies work

Plugin proxies try to match incoming requests against configured URL prefixes and apply rules to those requests (such as adding headers) before propagating the request to the specified downstream URL. Header rules have access to secrets via Mustache-like templating for easy authentication. Plugin proxies must be explicitly associated with a particular plugin in the plugin configuration; once specified, all proxyFetch requests made by that plugin will use the proxy. If no proxy is defined for a plugin, no special logic will apply and requests will be propagated to downstream URLs without modification.

Using a plugin proxy

Plugin proxies are associated with plugins via the plugin definition. To use a plugin proxy, edit the plugin you’d like to use the proxy for and select the plugin proxy to use. Once this is done, all requests made from that plugin’s proxyFetch() method will go through this proxy and have the rules applied.

Creating a plugin proxy

Only admins are allowed to create a plugin proxy. To create a plugin proxy, head over to the Plugins page and click the “Proxies” tab, followed by the “Create proxy” button.

Editing a plugin proxy

Only admins are allowed to edit a plugin proxy. To edit a plugin proxy, head over to the Plugins page and click the “Proxies” tab. Find the proxy you want to edit and click it, then click the “Edit” link in the top right corner. From there, make the changes you’re interested in and submit the form by clicking “Save proxy.”

Special cases to consider

  • If there are multiple matching URL prefixes with overlapping header keys, the more specific (i.e. longer) prefix rules will be used.
  • If a request from the plugin is invoked with header keys that overlap the proxy ruleset, the request-specific header values will be used.