Proxy Server
You can route Velt SDK events and API calls via a proxy to your own domain. This means you will have most Velt-related network calls branded to your domain.
There are two main aspects to this:
- Proxying the Velt SDK
- Proxying Velt API calls
Proxying the Velt SDK
To serve the Velt SDK via your own proxy server (e.g., nginx
) instead of Velt’s servers, provide your proxy’s base URL.
- Velt will automatically append
/lib/sdk@[VERSION_NUMBER]/velt.js
to yourproxyDomain
to determine the full URL for fetching the SDK.- If
proxyDomain
ishttps://cdn.yourdomain.com
, the SDK will be loaded fromhttps://cdn.yourdomain.com/lib/sdk@[VERSION_NUMBER]/velt.js
.
- If
- Your proxy server must be configured to to forward requests from
[your_proxyDomain]
tohttps://cdn.velt.dev
without any modifications to headers or any other content.
Proxying Velt API calls
To serve the Velt APIs via your own proxy server (e.g., nginx
) instead of Velt’s servers, provide your proxy’s base URL.
- If
apiProxyDomain
ishttps://api.yourdomain.com
, the APIs will be loaded fromhttps://api.yourdomain.com
. - Your proxy server should be configured to forward requests from
[your_apiProxyDomain]
tohttps://api.velt.dev
without any modifications to headers or any other content.
Integrity Check
To ensure the integrity of the Velt SDK, especially when served via a proxy, Velt leverages Subresource Integrity (SRI). Subresource Integrity (SRI) is a security feature that enables browsers to verify that resources they fetch (for example, from a CDN or your proxy server) are delivered without unexpected manipulation.
- Default:
false