Closed dario-piotrowicz closed 1 year ago
Note, the context needs to be passed by nitro first which is currently not happening: https://github.com/unjs/nitro/issues/773
A main blocker was that we were not able to pass a context to direct calls. It is now supported by https://github.com/unjs/unenv/commit/a9190c4120aa3ab2edcbb77f780f9e3f60b47c55 in latest version of unenv.
@pi0 the context being passed doesn't seem the one needed for the bindings as it only contains the cf
property
~Anyways unless I am mistaken that unenv change isn't actually related to the issue at hand since the issue is not around getting something when we manually fetch
but getting some platform specific data in the incoming request~
@pi0 the context there was indeed relevant :sweat_smile: , with that seems like the fix to the problem is quite simple: https://github.com/unjs/nitro/pull/997
Describe the feature
Hi, I'm trying to create a Nuxt application and deploy it via Cloudflare Pages
When you deploy an application via Cloudflare Pages you can access other Cloudflare products via bindings (which basically allow you to store data, etc...)
The issue is that I believe that such bindings are not made accessible via H3 (I expected to maybe find them in the
H3EventContext
but no luck, as you can see here: my gh nuxt get context test (deployed here))Edge Frameworks which I am used to all make such context available, like for example:
etc...
Would there be any chance for this context to also be provided by H3? :pray: (Because otherwise this creates a non trivial limitation to the use of Nuxt with Cloudflare Pages)
(Naturally please let me know if the context is actually available somewhere and I just missed it :sweat_smile: )
Additional information