简体   繁体   中英

Firebase functions: set region when using reserved hosting urls

I currently have my firebase setup like this (without a config, as the reserved hosting urls load the config automatically):

var functions = firebase.functions();
    if(window.location.hostname === "localhost") {
        firebase.functions().useFunctionsEmulator('http://localhost:5001');
    }
    var db = firebase.firestore();
    var perf = firebase.performance();

But, I cannot set the region to a different place, as I want it to be in europe-west2 . I've tried adding it as a parameter to the firebase.functions() without success.

This is what I have tried, according to the docs:

var functions = firebase.app().functions('europe-west2');

without success.

Is there any way that I can do this?

Thanks in advance.

Update:

For anyone looking to do the same, it is currently not supported.

You can find the relative parts in the docs for it here:

https://firebase.google.com/docs/functions/locations#http_and_client-callable_functions

https://github.com/firebase/firebase-js-sdk/issues/2302

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM