will smith
CDCloudflare Developers
•Created by will smith on 3/31/2025 in #workers-help
Replacements for pages _headers and _redirects
Hi, I've just migrated from pages to workers for my remix/react router apps. I used the _headers and _redirects for forcing cache headers on all files under a directory, and removing trailing slashes. e.g.
or
I'm struggling to find the replacement in workers. I've seen
assets.html_handling
which it seems I can use drop-trailing-slash
for. Hoping that will work on all endpoints. What about the caching?
Thanks6 replies
CDCloudflare Developers
•Created by will smith on 10/25/2024 in #pages-help
Avoiding waterfalls
I've got a website on pages. It has some backend logic, and also calls an api. The api is hosted on workers.
From what I understand, the cold start for the website should be very minimal because it's warmed during https handshake. That request alone is around 300ms, which is ok.
The website then needs to call the api. Again, this has around 300ms warm up. Now the total for the request to the website ends up around a full second. That's way too long. If I could pre-warm the api when warming pages, I think I can save at least 300ms.
How do I avoid waterfalls?
4 replies
CDCloudflare Developers
•Created by will smith on 10/20/2024 in #pages-help
How to debug remix latency
I've got a remix app deployed the standard way (link below), on a mysite.pages.dev domain. I've got the actual domain mysite.com with cloudflare NS, and a worker which forwards all mysite.com to mysite.pages.dev, the remix app. Sometimes requests are really quick, but sometimes it's over 800ms. Going in the logs, I see over 300ms between the "eventTimestamp" and the timestamp of the first log in my "loader". Is such a gap normal? How can I debug what's happening between the start of the "event" and reaching my loader? thanks
https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/
2 replies
CDCloudflare Developers
•Created by will smith on 6/30/2024 in #pages-help
Redirects remove trailing slash with Remix Pages app
I've got a Remix Cloudflare app and trying to remove trailing slashes.
mysite.com/blog/ -> mysite.com/blog
I've got _redirects with:
That doesn't seem to be doing anything. Any advice? Thanks.
https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/
https://developers.cloudflare.com/pages/configuration/redirects
1 replies