manual_set_proxy_url

View as MarkdownOpen in Claude

Manually set the proxy URL base used for generating webhook callback URLs. Call this when automatic proxy detection does not work for your deployment (e.g., behind a custom load balancer or tunneling service).

This overrides any value set via the SWML_PROXY_URL_BASE environment variable or auto-detected from request headers.

The proxy URL affects how webhook URLs are generated for SWAIG function callbacks, post-prompt URLs, and other webhook endpoints. Without a correct proxy URL, SignalWire cannot reach your service’s webhook endpoints when deployed behind a reverse proxy or tunnel.

Parameters

proxy_url
strRequired

The base URL to use for webhook generation (e.g., "https://my-agent.ngrok.io"). Trailing slashes are stripped automatically.

Returns

None

Example

1from signalwire import SWMLService
2
3service = SWMLService(name="my-service")
4
5# Set proxy URL for ngrok tunnel
6service.manual_set_proxy_url("https://abc123.ngrok.io")
7
8service.add_verb("answer", {})
9service.serve()