---
title: Proxy Live Update API Requests
description: Route Capawesome Cloud Live Update API traffic through a reverse proxy you control — serve the API from your own domain in Capacitor and Cordova apps.
---

# Proxy API Requests

By default, the Live Update SDK talks to the Capawesome Cloud API directly. If you'd rather keep that traffic on infrastructure you control, you can put a reverse proxy in front of the API and point the SDK at your own domain instead. The proxy forwards every request to Capawesome Cloud and returns the response, so updates keep working exactly as before.

## Why proxy requests?

Running your own proxy is optional, but it gives you a few things:

- **Own domain**: Serve the API under a hostname you control instead of `api.cloud.capawesome.io`.
- **Observability**: Log, inspect, and monitor update traffic before it leaves your network.
- **Network control**: Apply your own firewall, WAF, or access rules to the traffic.
- **IP anonymization**: Strip client IP addresses before they reach Capawesome Cloud (Enterprise plan only — see [IP anonymization](#ip-anonymization)).

## How it works

The Live Update SDK sends all of its requests to a single host. Once you point it at your proxy, the flow looks like this:

1. The app sends update requests to your domain (for example, `api.example.com`).
2. Your reverse proxy forwards each request to `https://api.cloud.capawesome.io`.
3. Capawesome Cloud responds, and your proxy passes the response back to the app.

## Requirements

You can build the proxy with any technology — nginx, Caddy, a cloud load balancer, an edge function, whatever fits your stack. Whichever you choose, it must:

- **Terminate HTTPS**: Serve your domain over HTTPS so the SDK can connect securely.
- **Forward to the API**: Proxy every request to `https://api.cloud.capawesome.io` and send `api.cloud.capawesome.io` as the `Host` header.
- **Forward the client IP**: Set the `X-Real-IP` header to the original client's IP address.

The last point matters more than it looks:

!!! warning "Forward the client IP"

    Capawesome Cloud applies rate limits per client IP based on the `X-Real-IP` header. If your proxy doesn't forward it, every request appears to come from the proxy itself, and all of your users share a single rate limit. Always set `X-Real-IP` to the real client IP — unless you're on the Enterprise plan and have set up [IP anonymization](#ip-anonymization).

## Reference implementation

To get you started, we maintain an open-source [Cloud API Proxy](https://github.com/capawesome-team/docker-cloud-api-proxy){:target="_blank"} repository. It's a minimal nginx-based Docker image — a `Dockerfile` and an nginx config — that forwards everything to the Capawesome Cloud API with the required headers already in place.

The relevant part of the nginx configuration looks like this:

```nginx title="default.conf"
server {
    listen 80;

    server_name api.example.com;

    location / {
        proxy_pass https://api.cloud.capawesome.io;
        proxy_ssl_server_name on;

        proxy_set_header Host "api.cloud.capawesome.io";
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
```

Replace `api.example.com` with your own domain and terminate TLS in front of the container in production (for example, via a load balancer or a reverse proxy such as Caddy or Traefik). This image is only a reference — you're free to implement the proxy with any tooling you prefer, as long as it meets the [requirements](#requirements) above.

## Configure the SDK

Once your proxy is reachable over HTTPS, point the SDK at it by setting the `serverDomain` option to your domain:

=== "Capacitor"

    ```json title="capacitor.config.json"
    {
      "plugins": {
        "LiveUpdate": {
          "serverDomain": "api.example.com"
        }
      }
    }
    ```

=== "Cordova"

    ```xml title="config.xml"
    <preference name="SERVER_DOMAIN" value="api.example.com" />
    ```

The `serverDomain` option takes a bare domain — no scheme and no path. The SDK always connects over HTTPS, so make sure your proxy is served over HTTPS as well.

## IP anonymization

Some teams don't want client IP addresses leaving their own infrastructure at all. On the **Enterprise** plan, you may drop the `X-Real-IP` header in your proxy so that no client IP reaches Capawesome Cloud. Because every request then arrives from your proxy's IP, we configure a dedicated, higher rate limit for that IP so your users aren't throttled as a single client.

[Contact our sales team](/contact-sales/){:target="_blank"} to enable IP anonymization for your proxy.

## Next steps

- [Self-Host Bundles](self-hosting.md) — keep your bundles on your own server while Capawesome Cloud handles update checks.
- [Privacy & Data Residency](privacy.md) — see what data is collected and how to choose an EU-based server location.
- [Get Started](setup.md) — install and configure the Live Update SDK.
