Wascer
Help Center
Explorar la documentación

Set up with Deno Deploy

1 min de lecturaView as Markdown

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.

¿Te resultó útil este artículo?

Still stuck? Talk to support.

Comentarios

Deja tu comentario

En el sitio solo aparecen tu nombre y la inicial de tu apellido; el correo se queda con nosotros. Consulta la política de privacidad.