Static IP guide
Making API requests with a static IP from a Node app on Netlify
Netlify Functions run as regional Node.js functions, and like most serverless compute, each invocation can land on a different outbound IP. Store your Fixie proxy URL as an environment variable scoped to the Functions context, and axios routes every call from a fixed pair of addresses instead of whatever address that invocation happened to get.
Recommended setup
Use Fixie HTTP/S proxy 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 Node.js to route outbound traffic through Fixie before connecting to API allowlisting.
Set up Fixie on Netlify
Create a Fixie HTTP/S proxy in the Fixie dashboard. Copy the proxy value into Netlify environment variables as FIXIE_URL, and copy the outbound IPs into the destination allowlist.
Implementation
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
Good to know
- Scope the variable to the production context (or per-branch, for preview deploys) so a staging Fixie proxy never leaks into production logs.
- Setting it from the CLI looks like
netlify env:set FIXIE_URL "<proxy-url>" --context production, which keeps the value out of the repo. - A change to an environment variable does not take effect until the next deploy, so trigger one after adding FIXIE_URL for the first time.
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 Node.js app on Netlify.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Node 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 Node app on Render
- Making API requests with a static IP from a Node app on Fly.io
- Making API requests with a static IP from a Node app on Koyeb
- Making API requests with a static IP from a Node app on AWS Lambda
Related docs
Is this guide useful?