Static IP guide
Making API requests with a static IP from a Go app on Vercel
Go functions on Vercel can reach allowlisted APIs by parsing FIXIE_URL once at init and constructing an http.Client whose Transport proxies through it. Because Go also honors HTTPS_PROXY out of the box, an environment variable in project settings is a valid zero-code alternative.
Recommended setup
Use Fixie Vercel integration for HTTP and HTTPS requests to an API, webhook provider, or service that allowlists outbound IP addresses. Store the proxy value in FIXIE_URL, then configure Go to route outbound traffic through Fixie before connecting to API allowlisting.
Set up Fixie on Vercel
Add the Fixie Vercel integration, create a proxy in the Fixie dashboard, and connect it to the Vercel project and environment. The integration can create FIXIE_URL in Vercel Environment Variables for the connected project.
Pull Vercel environment variables locally
vercel env pull
grep FIXIE_URL .env.localImplementation
The example below shows the core application-side change. Keep credentials in environment variables and avoid committing proxy, database, or API secrets.
Make an HTTP request through FIXIE_URL
package main
import (
"net/http"
"net/url"
"os"
)
func main() {
fixieURL, err := url.Parse(os.Getenv("FIXIE_URL"))
if err != nil {
panic(err)
}
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(fixieURL)},
}
_, err = client.Get("https://api.example.com/data")
if err != nil {
panic(err)
}
}Good to know
- Package-level client construction survives across warm invocations, so the parsed proxy URL is not re-read on every request.
- Register both Fixie IPs with the API provider for redundancy.
Allowlist and test the static IPs
- Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
- Add both IPs to the API provider.
- Deploy the updated Go app on Vercel.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Go app on Heroku
- Making API requests with a static IP from a Node app on Vercel
- Making API requests with a static IP from a Go app on Render
- Making API requests with a static IP from a Python app on Vercel
- Making API requests with a static IP from a Go app on Fly.io
- Making API requests with a static IP from a Go app on AWS Lambda