angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

Custom domain support for cloud functions httpscallable #2674

Closed pvdyck closed 3 years ago

pvdyck commented 3 years ago

Please provide support / documentation for "Add custom domain support to callable functions #3825" https://github.com/firebase/firebase-js-sdk/pull/3825 Merged here : https://github.com/firebase/firebase-js-sdk/pull/3863

(dirty ?) implementation based on region based URL (failing URL parsing) here => https://github.com/firebase/firebase-js-sdk/blob/05e6e0aa4508e943949890a1f9d04fc1d7d4eee4/packages-exp/functions-exp/src/service.ts#L102

Should we use the injected REGION token ?

pvdyck commented 3 years ago

answers : https://stackoverflow.com/questions/49825799/use-custom-domain-for-firebase-function-http-calls https://github.com/firebase/firebase-js-sdk/issues/1800 https://github.com/firebase/firebase-js-sdk/issues/1641

documented here : https://github.com/firebase/firebase-js-sdk/blob/fe55004befb7c5ae770a5c4732adc9f7a1a8833d/docs-exp/functions-types.functions.customdomain.md

jamesdaniels commented 3 years ago

Not documented yet but in 6.1 I added NEW_ORIGIN_BEHAVIOR which when used in conjunction with Firebase v8 allows ORIGIN to be provided without the region in the url.

pvdyck commented 3 years ago

Thanks a lot for your answer, can you give a practical configuration example if I host my api at i.e. https://api.mycompany.com/securedAPI/ ? Where do you specify the URL ? ( should I search in your commits ? )

pvdyck commented 3 years ago

Ok, latest firebase & latest angularfire => setting REGION directly works, nothing else to do ;-)