Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.27 KB

static-client-address-not-available.mdx

File metadata and controls

27 lines (18 loc) · 1.27 KB
title i18nReady githubURL
Astro.clientAddress is not available in prerendered pages.
true

import DontEditWarning from '~/components/DontEditWarning.astro'

StaticClientAddressNotAvailable: Astro.clientAddress is only available on pages that are server-rendered.

What went wrong?

The Astro.clientAddress property is only available when Server-side rendering is enabled.

To get the user's IP address in static mode, different APIs such as Ipify can be used in a Client-side script or it may be possible to get the user's IP using a serverless function hosted on your hosting provider.

See Also: