Skip to main content
To access authenticated external APIs with your plugin, you can configure a plugin proxy. 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.

Considerations

When creating a plugin proxy, consider the following:
  • 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.

Creating a plugin proxy

Users with the Edit Plugin Proxies permission can create a plugin proxy.
If you are using a proxy with sensitive information, such as an access token, first follow the steps to create a secret for the proxy.
  1. From the main sidebar, select Plugins.
  2. In the upper-right corner, click Create proxy.
  3. Do the following:
    • Under Proxy name, enter a human-readable name for the proxy (required).
    • Under Path, enter a unique identifier made of letters, numbers, and/or hyphens for the proxy (required).
    • In the URL prefixes section, click Add URL to configure URL prefixes to apply rules to requests going through this proxy (required). All requests passing through this proxy that match the URL prefix will have a set of rules applied.
      • Optionally, click Add header to configure a header for the URL.
        • If you are using a proxy with sensitive information, you can use mustache templating to reference a global secret by tag, e.g. {{secrets.my_auth_token}}.
  4. Click Create proxy.

Example plugin proxy configuration

Example plugin code

In this scenario, the request to fetch GitHub requests will be sent with the X-GitHub-API-Version and Authorization headers, with the Authorization header value interpolated to include the github_read_token secret if it exists in your Cortex workspace.

Managing plugin proxies

You can view your plugin proxies in Plugins > Proxies. The 'Proxies' tab shows all available plugin proxies.

Editing a plugin proxy

Users with the Edit Plugin Proxies permission can edit a plugin proxy.
  1. From the main sidebar, select Plugins.
  2. Select the Proxies tab.
  3. Locate the proxy you want to edit, then click the Overflow menu.
  4. Select Edit proxy.
  5. Make your changes, then click Save proxy.

Deleting a plugin proxy

Users with the Edit Plugin Proxies permission can delete a plugin proxy. Cortex does the following when a plugin proxy is deleted: checks if the proxy exists and if it’s in use, deletes all headers for the proxy’s URLs, flushes the header repo, deletes all URL configurations, removes any secret usages, and finally deletes the proxy entity itself.
  1. From the main sidebar, select Plugins.
  2. Select the Proxies tab.
  3. Locate the proxy you want to delete, then click the Overflow menu.
  4. Select Delete proxy. The Confirm proxy deletion window opens.
  5. Click Delete.
Last modified on September 9, 2026