bmullan91 / express-subdomain

Super simple subdomain middleware for expressjs
414 stars 49 forks source link

Subdomain not working with Glitch #55

Open old-df38257622 opened 4 years ago

old-df38257622 commented 4 years ago

Hey all. Say I have a Glitch express app - e.g. express.glitch.me. My server.js has this piece of code:

var test = new express.Router()
test.get('/', (req, res) => {
  res.send('Hello World!')
})
app.use(subdomain('api', test));

When I go to api.express.glitch.me, I simply get Glitch's project-not-found page. I've also tried subdomain(api.express, test), and this doesn't work either. Any help?

Zaedus commented 4 years ago

This is a website specific problem. Glitch doesn't allow you to do what you're trying to do.

DeathHound6 commented 3 years ago

I'm not so sure. I'm trying to use this for an API subdomain too. Although my code is running on glitch for now, I am using a custom domain. Then when visiting a valid GET endpoint on the subdomain, it returns not found: api.[domain]

I have registered the subdomain as one of the custom domains, and DNS is setup correctly