New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support firebase regions #90
Comments
Hosting rewrites to other than Injection the region post build seems to work, so including it in the build step should be straight forward. |
Hi! I'd also be very interested in this to improve performance. I've tested modifying the server after build but before deployment this and it seems to work well: -const server = functions.https.onRequest(toNodeListener(nitroApp.h3App));
+const server = functions.region("europe-west2").https.onRequest(toNodeListener(nitroApp.h3App)); |
Hi, I've been using the following configuration to workaround this. It uses the replace config to inject the region. // https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
/* Other config options */
nitro: {
preset: "firebase",
replace: {
"functions.https.onRequest": "functions.region('europe-west2').https.onRequest",
},
},
}); I'd be happy to open a PR to tackle this, however I'm not sure where the best place is to store the configuration. Looking at the Firebase docs, there is no way to set the region with |
This might be related (recent release of firebase-tools): firebase/firebase-tools#5504 |
Interesting, I see they have also updated their documentation: Direct requests to a function
So the workaround above will still work, as the region will be detected from the code. More details can be found here: Integrate web frameworks with Hosting |
nuxt/nuxt#13341
https://firebase.google.com/docs/functions/manage-functions#modify-region
The text was updated successfully, but these errors were encountered: