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
I'd expect that this would set a cookie named currentCoords to the coordinates from the request.geo object. However, the request.geo object doesn't have any coordinate information like the Next docs says it should. When I console.log it, I get the city I'm currently in, in the right region and country, but nothing else.
Steps to reproduce
Create a blank repo with the above middleware.
Insert a statement to log the request.geo object to the console.
Visit a page the middleware will intercept.
Observe the logged object, which will not match my expectations above. It's missing coordinate information (which Netlify should have available) and will include the region key as specified in the Next docs instead of the subdivision key from the Netlify docs.
Summary
This is my middleware file:
I'd expect that this would set a cookie named
currentCoords
to the coordinates from therequest.geo
object. However, therequest.geo
object doesn't have any coordinate information like the Next docs says it should. When Iconsole.log
it, I get thecity
I'm currently in, in the rightregion
andcountry
, but nothing else.Steps to reproduce
request.geo
object to the console.region
key as specified in the Next docs instead of thesubdivision
key from the Netlify docs.A link to a reproduction repository
https://github.com/jadenguitarman/algolia-next-netlify
Site is live at charleston.netlify.app, site id is
51751fce-133f-4e5b-8cca-fcd5704a9e07
Next Runtime version
4.28.5
More information about your build
netlify.toml
)What OS are you using?
Mac OS
Your netlify.toml file
No response
Your public/_redirects file
No response
Your
next.config.js
file`next.config.js`
Builds logs (or link to your logs)
No response
Function logs
No response
.next JSON files
No response
The text was updated successfully, but these errors were encountered: