Your Django app calls partner APIs that enforce IP whitelisting, but cloud deploys rotate your outbound IP. Route requests and httpx calls through two fixed EU IPs with one HTTPS_PROXY env var.
# settings.py or env
HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443
import requests
resp = requests.get(
"https://api.partner.eu/data",
headers={"Authorization": "Bearer .."}
)
Django apps deployed on cloud platforms get dynamic outbound IPs. When your app calls a partner API that enforces IP whitelisting, those rotating IPs get blocked.
Payment providers, CRMs, and enterprise APIs require IP whitelisting. When your Django app's cloud deployment gets a new outbound IP on every deploy, the whitelist breaks and API calls fail silently.
Whether you deploy Django on Heroku, Kubernetes, AWS, or a PaaS like Vercel or Netlify, the outbound IP changes with every deploy or scale event. You can't predict what IP your app will call from.
Your Django project has multiple environments, each with its own dynamic IP. Managing separate whitelists for dev, staging, and production is a maintenance nightmare.
Django itself doesn't provide a static outbound IP feature. The IP depends entirely on where you deploy it. You need an external proxy to give your app a predictable egress.
The Python requests library (and httpx, urllib3) automatically reads HTTPS_PROXY from the environment. Set it once and every outbound call your Django views make leaves through your fixed EU IPs.
HTTPS_PROXY and your existing requests.get() calls work as-is.Set HTTPS_PROXY and your Django app is done. No middleware, no settings changes.
Your existing Django view code works as-is. requests reads HTTPS_PROXY from the environment automatically.
# .env or settings.py environment
HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443
PARTNER_API_TOKEN=your_token
# views.py
import os
import requests
from django.http import JsonResponse
def sync_partner_data(request):
# requests honours HTTPS_PROXY automatically
resp = requests.get(
"https://api.partner.eu/data",
headers={"Authorization":
f"Bearer {os.environ['PARTNER_API_TOKEN']}"},
)
return JsonResponse(resp.json())
If you use httpx with Django async views, it also respects HTTPS_PROXY automatically.
# views.py (async)
import httpx
from django.http import JsonResponse
async def fetch_partner(request):
async with httpx.AsyncClient() as client:
# httpx reads HTTPS_PROXY automatically
resp = await client.get(
"https://api.partner.eu/data",
headers={"Authorization": "Bearer .."},
)
return JsonResponse(resp.json())
Set it wherever your Django app runs. Never paste the proxy string in plaintext.
# Docker Compose
services:
django:
env_file: .env
# Kubernetes: Secret
env:
- name: HTTPS_PROXY
valueFrom:
secretKeyRef:
name: outboundgateway-proxy
key: proxy-url
# Heroku
heroku config:set HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443
Two IPs, automatic failover
Your account comes with two static IP addresses (for example 51.xx.xx.10 and 51.xx.xx.11). Whitelist both on your partner API. If one proxy node is briefly unavailable, traffic shifts to the other.
📖 Complete Documentation: For detailed examples, error handling, and other Python libraries, see the Python SSL Proxy Guide and all other language guides.
Two addresses to whitelist, with automatic failover. No rotating cloud pool to chase.
Set HTTPS_PROXY and your existing requests, httpx, and urllib3 calls work as-is.
European data centres and a GDPR-conscious setup, giving your Django app a predictable EU address.
Docker, Kubernetes, Heroku, AWS, GCP, on-prem. One env var covers every deployment.
TLS passthrough means the proxy can't read your traffic. API keys and payloads stay private.
Starting from €19/month. Flexible plans for every scale. Cancel anytime.
Stop letting dynamic IPs break your partner API integrations. Set one env var and your outbound calls route through two fixed EU IPs.
€19/month starter plan • 7-day refund policy • Direct founder support
No. You don't need to add any middleware, change settings.py, or modify your views. Just set the HTTPS_PROXY environment variable wherever your Django app runs (in your .env file, Docker Compose, Kubernetes Secret, or Heroku config). Python's requests, httpx, and urllib3 read it automatically.
Yes. If you use Django's async views with httpx.AsyncClient, the HTTPS_PROXY environment variable is respected automatically. No additional configuration is needed beyond setting the env var.
The proxy works at the Python library level, not the web server level. Whether you run Django with gunicorn, uwsgi, or Django's dev server, as long as the HTTPS_PROXY environment variable is set for the process, outbound HTTP calls from your application code route through the proxy.
Happy to talk through how a two-IP EU egress fits your Django project.
Contact Our Founders →