Small Azure Functions app that forwards HTTP requests to a destination URL.
This project exists to give internal systems one controlled proxy endpoint, while keeping deployment simple (Flex Consumption + Bicep).
- Exposes one function route:
GET|PUT|POST|DELETE|HEAD|OPTIONS|TRACE|PATCH /api/proxy - Reads destination URL from:
- header
x-proxy-url-b64(base64-encoded absolute URL) - header
x-proxy-url - query string
url
- header
- Forwards request body + headers to destination
- Streams upstream response back to caller
This is an open forward proxy by design (destination is caller-controlled).
Use it only in trusted/internal scenarios and protect access with Function keys, network controls, and monitoring.
- .NET SDK 10
- Azure Functions Core Tools v4
- Azure CLI (for cloud deploy)
- Azurite (for local storage emulation)
From repo root:
dotnet restore
dotnet buildStart the function app:
cd src\AzureFunctionProxies.Function
func startBy default local endpoint is:
http://localhost:7071/api/proxy
curl -X GET "http://localhost:7071/api/proxy" \
-H "x-proxy-url-b64: aHR0cHM6Ly9naXRodWIuY29tL1JNYXJpb3dza2kvQXp1cmVGdW5jdGlvblByb3hpZXM="curl -X GET "http://localhost:7071/api/proxy" \
-H "x-proxy-url: https://github.com/RMariowski/AzureFunctionProxies"curl "http://localhost:7071/api/proxy?url=https://github.com/RMariowski/AzureFunctionProxies"When running in Azure, include function key:
- Header:
x-functions-key: <key> - or query string:
?code=<key>
Example:
curl "https://<app>.azurewebsites.net/api/proxy?url=https://github.com/RMariowski/AzureFunctionProxies" \
-H "x-functions-key: <function-key>"Infrastructure is in deployment/azure-function-proxy.bicep.
Quick deploy script (multi-region capable):
cd deployment
.\deploy.ps1 -Locations eastus,westeurope -BaseName afp -ResourceGroupPrefix rgOptional subscription override:
.\deploy.ps1 -SubscriptionId <subscription-id> -Locations eastus