title: Firebase Functions routing problem when doing post using html form data
body: <p>I am building a simple web app using node js express and cloud firebase functions</p>
  
  <p>i have 2 endpoints, 
  1. first point renders the form(GET request) and 
  2. POST endpoint that takes the form data on submit</p>
  
  <p>for some reason firebase skipping the function name in the post url(2nd end point) on form submission but it works fine on local express server</p>
  
  <p>example: if form acion attribute value is "check" and firebase function name is "helloWorld"</p>
  
  <p>the form submit url should be <code>"&lt;default firebase pefix&gt;/helloWorld/check"</code>
  but instead the url it posting to is <code>"&lt;default firebase pefix&gt;/check"</code>.
  firebase function name in the url is getting skipped. which is giving me function not found in location us-central etc</p>
  
  <p>another thing i observed is if i give slash as prefix to action attribute value like "action = "\check". firebase skipping the whole base url and appending from attribute value the port value</p>
  
  <p>i tried a work around by setting the static absolute path (path after production) to the form action attribute.</p>
  
  <p>But i want to if its a bug or am i missing something</p>
  
  <pre><code>&lt;form action="check" method="POST"   
  
      &lt;label for="uname"&gt;&lt;b&gt;Username&lt;/b&gt;&lt;/label&gt;
      &lt;input type="text" placeholder="Enter Username" name="uname" required&gt;     
      &lt;button type="submit"&gt;Login&lt;/button&gt; 
  
  &lt;/form&gt;
  </code></pre>
  
  <p>// action = "/check" this is skipping total base url all together</p>
  
  <pre><code>const functions = require('firebase-functions');
  
  const express = require('express')
  const bodyparser = require('body-parser')
  const app = express()
  app.set('port',6000)
  app.use(bodyparser.json())
  app.use(bodyparser.urlencoded({extended:true}))
  app.set('view engine', 'ejs');
  
  app.get('/',(req,res)=&gt;{
    res.render('formfill')
  })
  
   // this below end point is supposed to get triggered on form submission.
  // and it is working fine on local express server, but not on firebase functions
  
  app.post('/check',(req,res)=&gt;{
  
  res.send(`you said ${req.body.uname}`)
  })
  
  exports.helloWorld = functions.https.onRequest(app);
  </code></pre>