lifehackerhansol
CDCloudflare Developers
•Created by lifehackerhansol on 8/26/2024 in #workers-help
Worker is lowercasing URL using Response.redirect
Using this code:
it correctly logs:
However it is doing this instead:
This causes 404 on the target location's web server.
Is there something going on that I don't know about causing this?
4 replies
CDCloudflare Developers
•Created by lifehackerhansol on 10/18/2023 in #pages-help
How to have exact opposite behaviour of CF Pages pretty URL??
https://wiki-8j2.pages.dev
https://github.com/flashcarts/wiki
I've found that Cloudflare Pages' built in pretty URL system will rewrite links to
.html
to remove this suffix.
I want to have the exact opposite: if a user accesses the URL via pretty URL format, I want it to automatically append .html
. I would rather user have the full path; the only reason the pretty URL is relevant for me is to make internal linking in markdown not a huge PITA to do.
While I haven't tried it, I am naively thinking that if I make use of a _redirects
file for this, it would cause an infinite loop of _redirects
redirecting to .html
and CF Pages 308-ing to non-.html
.
Is there a way to get around this?2 replies
CDCloudflare Developers
•Created by lifehackerhansol on 8/29/2023 in #general-help
WAF on non-known bots trigger on a web browser GET request
While playing around with Cloudflare security rules for R2, I came across the
Known Bots
flag.
I've tested this in a few angles, and it appears that doing any action against (not cf.client.bot)
seems to also trigger on Firefox and Microsoft Edge.
Some questions for that:
- Are plain ol' browsers also considered bots?
- If I am using a public bucket, do I have no choice but to let bots fly so that a standard web browser can do its job? (and sacrifice free R2 ops count for this?)3 replies