Jakob Norlin
Jakob Norlin
CDCloudflare Developers
Created by Jakob Norlin on 2/28/2024 in #general-help
Is it possible to make the Cloudflare CDN use different cache entries based on a cookie value?
More specifically, can I put a cookie that has theme=light and get a different cached response from the CDN than if I have theme=dark?
5 replies
CDCloudflare Developers
Created by Jakob Norlin on 1/3/2024 in #pages-help
My code is executed in the build step, crashing because of missing env vars
So I have a solid-start project that I want to deploy to pages. I have a problem with deployment to Cloudflare pages though. After the build is complete and code is uploaded, my code is executed in the build step. This leads to a deploy error, because the environment variables aren't available so the code throws. Why does this happen? It doesn't make sense to me. As the error happens after upload I suspect this is not an error with solid-start, but I could be wrong about that of course.
09:30:24.186 Found _routes.json in output directory. Uploading.
09:30:24.202 Validating asset output directory
09:30:25.129 Deploying your site to Cloudflare's global network...
09:30:28.310 Uploading... (38/45)
09:30:28.909 Uploading... (40/45)
09:30:28.925 Uploading... (43/45)
09:30:28.993 Uploading... (45/45)
09:30:28.994 ✨ Success! Uploaded 7 files (38 already uploaded) (1.01 sec)
09:30:28.994
09:30:29.231 ✨ Upload complete!
09:30:31.427 Success: Assets published!
09:30:32.382 Error: Failed to publish your Function. Got error: Uncaught Error: No connection string
at chunks/nitro/cloudflare-pages.mjs:7:32544
09:30:24.186 Found _routes.json in output directory. Uploading.
09:30:24.202 Validating asset output directory
09:30:25.129 Deploying your site to Cloudflare's global network...
09:30:28.310 Uploading... (38/45)
09:30:28.909 Uploading... (40/45)
09:30:28.925 Uploading... (43/45)
09:30:28.993 Uploading... (45/45)
09:30:28.994 ✨ Success! Uploaded 7 files (38 already uploaded) (1.01 sec)
09:30:28.994
09:30:29.231 ✨ Upload complete!
09:30:31.427 Success: Assets published!
09:30:32.382 Error: Failed to publish your Function. Got error: Uncaught Error: No connection string
at chunks/nitro/cloudflare-pages.mjs:7:32544
3 replies