firebase-tools: v 6.9.2
nodejs v10.15.3
npm v6.9.0
Platform: Ubuntu
index.ts
import * as functions from 'firebase-functions';
import { app } from './api/hello.api';
export const api = functions.https.onRequest(app)
./api/app.ts
import * as cors from 'cors'
import * as express from 'express'
export const app = express()
app.use(cors())
app.get('/', (req, res)=> {
try{
res.send("Hello")
}catch(error){
res.send(error)
}
})
npm run serve
localhost results to:Cannot GET /<firebase-app-name>/us-central1/apiThis issue does not seem to follow the issue template. Make sure you provide all the required information.
Hmm, I wonder if this has to do with stacking multiple cors() (we pull it in already for Callable requests). I'll investigate today, thanks for the well written report!
@abeisgoat I bet we just have not done a good job routing requests to function subpaths
Fix is merged in, please re-open if you're still experiencing this once 6.9.3 is out.