fix: user agent not fetchable from astro in ssg

Changed files
-2
src
pages
-2
src/pages/404.astro
···
const urlPathname = Astro.url.pathname
const urlOrigin = Astro.url.origin
-
const userAgent = Astro.request.headers.get('User-Agent') || 'Unknown User-Agent';
const astroGenerator = Astro.generator
const currentISODate = new Date().toISOString();
---
···
<span>Date: {currentISODate}</span>
<span>Content-Type: text/html; charset=utf-8</span>
<span>X-Request-Path: {urlPathname}</span>
-
<span>X-User-Agent: {userAgent}</span>
<span>X-Request-Origin: {urlOrigin}</span>
</div>
</div>