Is there a way to globally set the region from which an httpsCallable function is being called. Right now I initialize my app like this:
const app = firebase.initializeApp(firebaseConfig)
app.functions('europe-west1')
What is then created is the firebase app object. When console logging the app variable it gives me back an object with the services_ property. In this property there is a function property named europe-west1 as a service. However, when then calling a function that looks like this:
const deleteUserCloudFunction = firebase
.functions()
.httpsCallable('deleteUser')
another property is created within the functions service, named [DEFAULT] which has the 'us-central1' region specified. How can I change this by default specified region to 'europe-west1'?
If I correctly understand your question, you should do:
var app = firebase.initializeApp(config);
var functions = app.functions('europe-west1');
const deleteUserCloudFunction = firebase
.functions()
.httpsCallable('deleteUser')
More details in the documentation.