Getting domain which requested project - Custom Domains

Hello. I’m planning on making a little testing app which will be linked via a custom domain. The app will send a different message based on the domain that requested it (in a CNAME field in DNS).

For example:

site1.com -> CNAME project.com —> returns “hello site1.com

site2.com -> CNAME myproject.com —> returns “hello site2.com

Would this be possible? I’m planning on using the vhost package with express to handle the vhost stuff. However, I don’t know if this would be possible? I’ve done something similar like this on my own local hardware.

@glitch_support Any idea?