Skip to content

Support functions region #1874

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

Closed
jamesjwarren opened this issue Sep 13, 2018 · 7 comments
Closed

Support functions region #1874

jamesjwarren opened this issue Sep 13, 2018 · 7 comments

Comments

@jamesjwarren
Copy link

There doesn't seem to be anyway to configure the region or url for a firebase function, the URL appears to be hardcoded to us-central1. It is possible with the underlying firebase SDK through the functions constructor but I can't see anywhere that is exposed in angularfire.

firebase.app().functions('europe-west1')

Regions are fairly new so I guess this is yet to be implemented in angularfire?

Version info

Angular: 6.1.7

Firebase: 5.4.2

AngularFire: 5.0.0

@jamesdaniels
Copy link
Member

I'll get this in 5.1, thanks for pointing it out!

@Meistercoach83
Copy link
Contributor

Hi @jamesdaniels! Is it available now?

@jamesdaniels
Copy link
Member

Released in 5.1, see the the PR mentioned above on how to use it.

@rubenheymans
Copy link

this is not working for europe-west1. Without setting them to europe-west1 it works fine but when I update my functions location, REGION in app.module.ts and rewrites in firebase.json, I get CORS errors on all my callables

@ibnYusrat
Copy link

this is not working for europe-west1. Without setting them to europe-west1 it works fine but when I update my functions location, REGION in app.module.ts and rewrites in firebase.json, I get CORS errors on all my callables

See if you're actually deploying in europe-west1 at the first place.

@rubenheymans
Copy link

Default GCP resource location: eur3 (europe-west), I don't know where else I can check this?

@sedkis
Copy link

sedkis commented Feb 15, 2021

Confirmed not working globally.

When using dependency injection this doesn't work:
app.module.ts

  imports: [
...
    AngularFireModule.initializeApp(environment.firebase),
    AngularFireFunctionsModule,
]
providers: [
    ...
        {
      provide: REGION,
      useValue: 'europe-west1',
    }
]

and use:

firebase.functions().httpsCallable(...

The above still sends Function calls to us-central1.

But if I do it at the function level it works:

firebase.app().functions("europe-west1").httpsCallable('...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants