Downloading Platform-Specific Code

If you prefer to host your proxy function on your own infrastructure instead of using the EnvManager hosted proxy, you can download generated code for your deployment platform.

Supported Platforms

PlatformRuntimeGenerated File
VercelEdge Functionsapi/proxy-{slug}.ts
NetlifyEdge Functionsnetlify/edge-functions/proxy-{slug}.ts
CloudflareWorkerssrc/proxy-{slug}.ts
AWS LambdaNode.js Lambdalambda/proxy-{slug}.mjs

How to Download

Open the Download Modal

On the proxy functions page, find the proxy you want to download. Click the three-dot menu on the proxy row and select Download Code.

Select a Platform

The download modal shows four platform options. Click the platform you deploy to. The generated code updates in the preview area.

Review the Code

The preview shows the complete, ready-to-deploy code. It includes:

  • The proxy endpoint function
  • Secret injection from environment variables
  • CORS header handling based on your allowed origins
  • The correct HTTP method and target URL

Copy or Download

  • Copy Code -- copies the code to your clipboard
  • Download -- downloads the code as a file with the correct filename and path for your platform

Deployment Instructions

After downloading the code, you need to:

  1. Place the file in the correct directory for your platform (shown in the modal)
  2. Set environment variables on the platform for each secret variable used in the proxy
  3. Deploy your application

Setting Environment Variables

The generated code reads secrets from environment variables on the hosting platform. The variable names match the keys from your EnvManager environment. You can set these manually on each platform, or use EnvManager's platform integrations to sync them automatically.

Hosted vs Self-Hosted

FeatureHosted ProxySelf-Hosted (Downloaded Code)
Setup effortNone -- works immediatelyRequires deploying to your platform
Secret managementHandled by EnvManagerYou manage secrets on the hosting platform
LatencyRoutes through EnvManagerRuns on your edge/server infrastructure
CORSConfigured in EnvManagerConfigured in the generated code
Token authenticationx-proxy-token header requiredDepends on your platform's auth setup
BillingCounts against invocation limitsNo invocation limits from EnvManager

Self-hosted proxies run independently of EnvManager after download. Changes to the proxy configuration in EnvManager are not automatically reflected in the downloaded code. Download the code again after making changes.

Get DevOps tips in your inbox

Security best practices and product updates. No spam.

No spam. Unsubscribe anytime.