You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone the repository git clone [email protected]:sarahetter/astro-netlify-edge-starter.git
Install dependencies: npm install
Incorrect behaviour
Start the dev server using ntl dev --country=AU to choose Australia as the country code
Observe the page at http://localhost:8888 - the message displayed will be "Welcome, visitor from United Kingdom!" (this will be shown as your own country name instead of "United Kingdom")
This is incorrect behaviour as the geolocation has not been mocked with the Australia country code
Using console.log(context); to log the edge function context shows my UK-based geolocation:
Describe the bug
When using
ntl dev --country=<2-letter-iso-code>
it fails to setgeo=mock
as suggested in the documentation.Instead it reads the cached or real version of the country code if it exists.
Steps to reproduce
This was reproduced with the Astro starter kit.
git clone [email protected]:sarahetter/astro-netlify-edge-starter.git
npm install
Incorrect behaviour
ntl dev --country=AU
to choose Australia as the country codeconsole.log(context);
to log the edge function context shows my UK-based geolocation:Correct behaviour by adding the geo command
ntl dev --country=AU --geo=mock
to choose Australia as the country code AND to enable geolocation mockingconsole.log(context);
to log the edge function context now shows:Configuration
Environment
The text was updated successfully, but these errors were encountered: