Chaika
04/30/2023, 3:37 AMChaika
04/30/2023, 3:41 AMSerby
04/30/2023, 3:41 AMSerby
04/30/2023, 3:46 AMSerby
04/30/2023, 3:48 AMSerby
04/30/2023, 3:49 AM*
and return it hehChaika
04/30/2023, 3:55 AMvar url = new URL(request.url)
var subdomain = url.host.split('.')[0]
The you could just pass it in the header, or in the path/query/etc, whatever works with your originSerby
04/30/2023, 3:56 AMChaika
04/30/2023, 3:57 AMChaika
04/30/2023, 3:57 AM*.domain.com/*
is a Worker Route, you would add that in the Worker Routes tab of your zoneSerby
04/30/2023, 3:57 AMSerby
04/30/2023, 4:00 AM*
..../`*`😅Serby
04/30/2023, 4:05 AMChaika
04/30/2023, 4:10 AMAAAA * 100:: Proxied
is the types/information of the DNS Record you need to create, AAAA being the type, * being the name, 100::
is the target. 100::
is IPv6 Discard, just used so that Cloudflare responds to DNS Queries with their Proxy IPs (allowing traffic to flow into Cloudflare's pipeline), and a worker route will handle the request before it actually tries to talk to a non-existent origin. The 100::
is just so even if it does fail to match a worker route, the traffic is just discarded rather then trying to talk to a real origin.
You need a worker set up/created first before you create that worker route. You can configure Worker Routes either under the Worker's Trigger tab, or within a zone/website under the Worker Routes Tab (Magic Link: ).
Before you add the wildcard route, make sure you have routes with Service: none for normal subdomains you do not want the worker to execute on. You can do that by just creating wildcard routes for them (coolsubdomain.example.com/*
, Service: None). Otherwise, the wildcard worker would run on it
Parsing out the subdomain is easy enough generally. For the other part, Workers can fetch a normal host, and you could just provide the subdomain in an http header.Serby
04/30/2023, 4:13 AM*
.domain. com/* and i saw that populated a drop down with None and the other test worker I had so I just linked it to that for now since that worker was already dishing my html templateSerby
04/30/2023, 4:17 AMDani Foldi
04/30/2023, 7:35 AMAghaFarokh
04/30/2023, 4:44 PMAghaFarokh
04/30/2023, 4:44 PMAghaFarokh
04/30/2023, 4:45 PMHardAtWork
04/30/2023, 5:13 PMUnsmart | Tech debt
04/30/2023, 5:34 PMZakum
04/30/2023, 6:59 PMZakum
04/30/2023, 7:16 PMSkye
04/30/2023, 7:17 PMZakum
04/30/2023, 7:17 PMSkye
04/30/2023, 7:17 PMUnsmart | Tech debt
04/30/2023, 7:18 PMZakum
04/30/2023, 7:22 PM