bunny.net × Astro

Astro.locals.runtime

Edge context

What the bunny.net network tells the script about a request.

Astro.clientAddress216.73.217.33
runtime.countryUS
runtime.requestId1c83571b743ab783f58ef344dba143bd
Astro.urlhttps://astro-ssr-demo.bunny.run/edge
User agentMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Every edge header on this request

cdn-connectionid10375196281
cdn-hostastro-ssr-demo.bunny.run
cdn-ja4t13d1011h2_61a7ad8aa9b6_3fcd1a44f3e3
cdn-loopcount1
cdn-mobiledevicefalse
cdn-proxyver1.70
cdn-pullzoneid6370161
cdn-requestcountrycodeUS
cdn-requestid1c83571b743ab783f58ef344dba143bd
cdn-requeststatecodeOH
cdn-serverid1430
cdn-serverzonePB

Using it

const { country, requestId, clientAddress } = Astro.locals.runtime;

// Keep working after the response goes out.
Astro.locals.runtime.waitUntil(recordVisit(country));