Chris Stryczynski
Chris Stryczynski

Reputation: 34071

Can I route a firebase request to a GCP cloud function?

Is there someway I can route a request directly to a GCP cloud function?

For example the following:

{
  "hosting": {
    "public": "public",
    "rewrites": [
      {
        "source": "/",
        "function": "example"
      }
    ]
  }
}

However the above seems to point to a firebase function rather than a GCP cloud function. Even though the GCP function appears as a 'function' in Firebase Functions?

Upvotes: 0

Views: 37

Answers (1)

Chris Stryczynski
Chris Stryczynski

Reputation: 34071

It seems that is exactly the correct syntax however / did not seem to work. When I changed it to /test it then worked correctly...

This is because / would resolve to the default public/index.html file instead.

Upvotes: 1

Related Questions