Wildcard subdomains #2
Replies: 3 comments 3 replies
-
|
I personally think that the simple way to do this is to map a wildcard subdomain to a single val, and then that val can act as a "router", sending on the request to whatever other vals it might want to go to. |
Beta Was this translation helpful? Give feedback.
-
|
This is how I intuitively thought custom subdomains would work. I very much wanted to set up the same thing: I threw together an open source reverse proxy on cloudflare workers last night to demonstrate the behavior I'd like. Here's a simple val that I wrote: https://just_be-hi.web.val.run. You can now access this val at https://hi.val.just-be.dev. Going to https://val.just-be.dev just forwards you to my val.town profile. The reverse proxy I wrote isn't perfect and certainly won't work for everyone. You've got to be familiar with cloudflare workers and how to deploy them for one. It also requires enabling Total TLS on cloudflare for the wildcard domain to have proper certificates. That's gated behind an advanced cert feature that cloudflare charges $10 a month for. The other big downside to my approach is that when someone's viewing my profile the URLs they see are still the |
Beta Was this translation helpful? Give feedback.
-
|
Just wanted to mention that if you ever want to move to https://caddy.community/t/serving-tens-of-thousands-of-domains-over-https-with-caddy/11179 It would also be neat if the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://discord.com/channels/1020432421243592714/1191861777915465728/1192146955363700767
Beta Was this translation helpful? Give feedback.
All reactions