0

I'd like any https request to MY_CUSTOM_DOMAIN/functions/** to go to firebase functions.

I'm aware of the below solution:

Use custom domain for firebase function http calls https://firebase.google.com/docs/hosting/functions#create_an_http_function_to_your_hosting_site

My understanding is this requires adding every single function to this list though. It would make my firebase.json file pretty long and probably I'll forget to update it on future functions.

esafresa
  • 480
  • 7
  • 19

1 Answers1

0

You can refer to this documentation to use the wildcards and avoid repeating URL paths. Seems like you have to mention every function you are using for routing.

There is one workaround, As you are concerned about firebase.json. You can define an index function which determines the specific path by using req.path and calls other Cloud Functions to handle the respective request.

Also have a look at this thread1 & thread2

Roopa M
  • 2,171
  • 4
  • 12