Hi all! I’ve been trialling the new Edge functions using SvelteKit and its been great! One thing I’ve realised however is the X-Nf-Client-Connection-Ip header isn’t populated to the function handler unlike standard functions.
Any idea if this is just a result of it being in beta or is there no plan to currently expose this header inside Edge functions at this stage?
My app requires the end users IP to function (Its a geo-location app) so wont work without it sadly.
Apart from that Edge functions have been great, fantastic work! Congrats to everyone whos got them this far!
Thanks for raising this! We are aware of this issue and have a change planned to support this. We’re not sure when exactly, but it’s now on our roadmap. I hope this is okay!
No problem! Unfortunately not at the moment, but that’s also something we’re looking into. But, if we don’t have our changelog in place by the time this is released, we will let you know here as soon as it’s out
The ‘X-Nf-Client-Connection-Ip’ header should now be accessible for edge functions. The property is not yet available on the Context object yet, however, so you will have to access it by reading the header directly. Hope this helps
Update: As we are standardizing on the Context object, the proper way to do this going forward is now Context.ip, and the header will no longer be directly accessible.