Wascer
Themen im Hilfe-Center

Set up with Deno Deploy

1 Min. LesezeitAls Markdown ansehen

Die Artikel erscheinen auf Englisch.

For sites hosted on Deno Deploy, create a serverless function that acts as a proxy for the sGTM container.

Step 1. Create the proxy script

Create a main.ts file with the following logic: set ORIGIN_PATH to the path you want (e.g., /metrics) and GTM_URL as the URL of your sGTM container. The Deno.serve function checks whether the request starts with ORIGIN_PATH and, if so, routes it to the container with the appropriate headers (X-Forwarded-For, X-From-Cdn, CF-Connecting-Ip, and Host).

Step 2. Deploy

  • Via the web UI: open dash.deno.com, create a new Playground, paste the script into main.ts, and click Save & Deploy.
  • Via CLI: run deno init proxy-folder, create main.ts with the script, and run deno deploy.

After deployment, configure the custom domain in Deno Deploy so it points to your main domain.

War dieser Artikel hilfreich?

Nicht gelöst? Schreib dem Support.

Kommentare

Kommentar schreiben

Auf der Website erscheinen nur Ihr Vorname und der Anfangsbuchstabe Ihres Nachnamens; Ihre E-Mail-Adresse bleibt bei uns. Siehe Datenschutzerklärung.