Jaime
Jaime
CDCloudflare Developers
Created by ! Julius Cole on 6/16/2023 in #general-help
Cloudflare WAF
Nice
50 replies
CDCloudflare Developers
Created by liweijian on 6/30/2023 in #general-help
How to make `wrangler dev` run in background?
One way would be to use a terminal multiplexer like tmux. Here's a brief tutorial: To install on Ubuntu, run sudo apt install tmux. Run tmux new -s dev to create a virtual terminal under the name dev. To hide the terminal, hit Ctrl + B and then hit D. To open the terminal again, run tmux attach -t dev.
2 replies
CDCloudflare Developers
Created by 0xAsimetriq on 6/23/2023 in #pages-help
Serving ./well-known/apple-app-site-association file from pages
Yup, you would need to add the following header to the desired path: Content-Disposition: inline
3 replies
CDCloudflare Developers
Created by ZEnderMan333 on 6/23/2023 in #general-help
Multiple routes on a worker?
You could use the following code to do the same across different domains, or if you prefer to work with the full URLs:
export default {
async fetch(request, env, ctx) {
const url = request.url;

switch(url) {
case "https://example.com/something":
// Do something
break;
case "https://example2.com/something-else":
// Do something else
break;
}
return new Response("Hello World");
}
};
export default {
async fetch(request, env, ctx) {
const url = request.url;

switch(url) {
case "https://example.com/something":
// Do something
break;
case "https://example2.com/something-else":
// Do something else
break;
}
return new Response("Hello World");
}
};
3 replies
CDCloudflare Developers
Created by ZEnderMan333 on 6/23/2023 in #general-help
Multiple routes on a worker?
Hi, You could assign both routes to the worker under the triggers section of the worker's settings, and then set the worker to do something like the following:
export default {
async fetch(request, env, ctx) {
const path = new URL(request.url).pathname;

switch(path) {
case "/something":
// Do something
break;
case "/something-else":
// Do something else
break;
}
return new Response("Hello World");
}
};
export default {
async fetch(request, env, ctx) {
const path = new URL(request.url).pathname;

switch(path) {
case "/something":
// Do something
break;
case "/something-else":
// Do something else
break;
}
return new Response("Hello World");
}
};
3 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
I was able to set the certificate for www.dayfiles.com to GTS through the API, thus keeping the CA consistent across the entire site. I consider this a win!
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
I see. Thanks all 🙂
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
Idk
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
Yeah, so I guess it would make sense for both to be GTS
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
It's not a big deal, though. It just kind of triggered my OCD, I guess NotLikeThis
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
Just yesterday
14 replies
CDCloudflare Developers
Created by Jaime on 6/21/2023 in #pages-help
Is it possible to change the SSL CA for a site hosted on Pages?
I actually added both custom domains one right after the other
14 replies