From: Ardis Lu Date: Sat, 21 Jan 2023 06:12:20 +0000 (-0800) Subject: Update example configs to use custom domains X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=89d2cc5ad55eacde0e37150dea1675170158e1c1;p=cloudflare-workers Update example configs to use custom domains Better reflects usage in the README and actual usage --- diff --git a/cors/wrangler.toml.example b/cors/wrangler.toml.example index a9d818f..de06eb6 100644 --- a/cors/wrangler.toml.example +++ b/cors/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'cors' main = 'index.js' -compatibility_date = '2022-11-03' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'cors.example.com', custom_domain = true } diff --git a/hash/wrangler.toml.example b/hash/wrangler.toml.example index 18e859d..0782aa2 100644 --- a/hash/wrangler.toml.example +++ b/hash/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'hash' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'hash.example.com', custom_domain = true } diff --git a/instagram/wrangler.toml.example b/instagram/wrangler.toml.example index 10e17f1..c16824d 100644 --- a/instagram/wrangler.toml.example +++ b/instagram/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'instagram' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'instagram.example.com', custom_domain = true } diff --git a/ip/wrangler.toml.example b/ip/wrangler.toml.example index 4df949a..69b04ae 100644 --- a/ip/wrangler.toml.example +++ b/ip/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'ip' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'ip.example.com', custom_domain = true } diff --git a/proxy/wrangler.toml.example b/proxy/wrangler.toml.example index e3cdc64..c5dea83 100644 --- a/proxy/wrangler.toml.example +++ b/proxy/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'proxy' main = 'index.js' -compatibility_date = '2022-11-03' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'proxy.example.com', custom_domain = true } diff --git a/pwned/wrangler.toml.example b/pwned/wrangler.toml.example index 0feadea..0bedea7 100644 --- a/pwned/wrangler.toml.example +++ b/pwned/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'pwned' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'pwned.example.com', custom_domain = true } diff --git a/qr/wrangler.toml.example b/qr/wrangler.toml.example index ab62447..784cc5f 100644 --- a/qr/wrangler.toml.example +++ b/qr/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'qr' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'qr.example.com', custom_domain = true } diff --git a/style/wrangler.toml.example b/style/wrangler.toml.example index 5a4d56a..d61590b 100644 --- a/style/wrangler.toml.example +++ b/style/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'style' main = 'index.js' -compatibility_date = '2022-11-03' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'style.example.com', custom_domain = true } diff --git a/unroll/wrangler.toml.example b/unroll/wrangler.toml.example index 97917e3..70b708f 100644 --- a/unroll/wrangler.toml.example +++ b/unroll/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'unroll' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'unroll.example.com', custom_domain = true } diff --git a/uuid/wrangler.toml.example b/uuid/wrangler.toml.example index a7ef91f..251cbb2 100644 --- a/uuid/wrangler.toml.example +++ b/uuid/wrangler.toml.example @@ -1,4 +1,4 @@ name = 'uuid' main = 'index.js' -compatibility_date = '2022-07-10' -route = 'example.com/*' +compatibility_date = '2023-01-20' +route = { pattern = 'uuid.example.com', custom_domain = true }