Support for subdomains?

Congrats on the launch!

we have a project that runs through subdomains, i.e. mysub1.demo.com and mysub2.demo.com etc…

When I run the project on gitpod, it opens something like https://3000-ee8ad1da-21e9-453c-a6ad-ede1b1e7101d.ws-eu0.gitpod.io/

I tried to prefix it with our subdomain like so: https://mysub1.3000-ee8ad1da-21e9-453c-a6ad-ede1b1e7101d.ws-eu0.gitpod.io/
but got redirected elsewhere

Ideas?

[original thread by Salem Korayem]

Hi Salem,
at the moment we do not have support for custom subdomains. However, in many cases all you need for your code to work is a correct Host header. That’s something that a reverse proxy can do for you. Maybe something like tinyproxy, using Go’s built-in reverse proxy, or https://github.com/nodejitsu/node-http-proxy#modify-a-response-from-a-proxied-server might do the trick.

Coming to think of it, this kind of feature might make sense in gp forward-port as well.

Hello,

This is something we need as well.

In localhost, we have something like subdomain1.lvh.me:3000, subdomain2.lvh.me:3000, and others

@kevinhq Have you tried to use the local companion: Gitpod Local Companion - localhost is going remote In such case your app will be available on localhost as usual and you can have subdomain on localhost.

2 Likes

This is really awesome. Nice work!

1 Like