Epailes
Epailes
CDCloudflare Developers
Created by Epailes on 11/16/2023 in #general-help
Limit access to flexible images via worker?
I want to only allow access to my images stored on cf images through my worker, but the issue is I want to use flexible variants to access them. My issue is that the only solution I can see to this is using signed delivery URLs, which disables flexible variants. Is it possible to block access to my imagedelivery.net url and customdomain.com/cdn-cgi/imagedelivery/ and only allow access via a worker?
3 replies
CDCloudflare Developers
Created by Epailes on 7/14/2023 in #pages-help
Pages Build Failing due to 404 package not found
I'm getting a new error in my next-on-pages project during the build phase, I went back to a previously successful build and re-deployed it and it is also failing as well. Error:
21:39:06.154 npm ERR! code E404
21:39:06.155 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@vercel/next/-/next-3.8.6.tgz - Not found
21:39:06.156 npm ERR! 404
21:39:06.156 npm ERR! 404 '@vercel/next@https://registry.npmjs.org/@vercel/next/-/next-3.8.6.tgz' is not in this registry.
21:39:06.156 npm ERR! 404
21:39:06.156 npm ERR! 404 Note that you can also install from a
21:39:06.156 npm ERR! 404 tarball, folder, http url, or git url.
21:39:06.158
21:39:06.158 npm ERR! A complete log of this run can be found in:
21:39:06.158 npm ERR! /opt/buildhome/.npm/_logs/2023-07-14T20_38_03_353Z-debug-0.log
21:39:06.197 Error during NPM install
21:39:06.202 Failed: build command exited with code: 1
21:39:07.008 Failed: error occurred while running build command
21:39:06.154 npm ERR! code E404
21:39:06.155 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@vercel/next/-/next-3.8.6.tgz - Not found
21:39:06.156 npm ERR! 404
21:39:06.156 npm ERR! 404 '@vercel/next@https://registry.npmjs.org/@vercel/next/-/next-3.8.6.tgz' is not in this registry.
21:39:06.156 npm ERR! 404
21:39:06.156 npm ERR! 404 Note that you can also install from a
21:39:06.156 npm ERR! 404 tarball, folder, http url, or git url.
21:39:06.158
21:39:06.158 npm ERR! A complete log of this run can be found in:
21:39:06.158 npm ERR! /opt/buildhome/.npm/_logs/2023-07-14T20_38_03_353Z-debug-0.log
21:39:06.197 Error during NPM install
21:39:06.202 Failed: build command exited with code: 1
21:39:07.008 Failed: error occurred while running build command
8 replies
CDCloudflare Developers
Created by Epailes on 7/11/2023 in #workers-help
How to make sure wildcard worker doesn't trigger on specific routes?
I have a wildcard worker that basically works as a rewrite proxy to my pages domain, on the old version of the workers dashboard it was quite easy to mark certain routes to not trigger any worker, however on the new combined dashboard I can't figure out how to do this? Currently I have blah.example.com as a custom domain on my pages project, and my wildcard worker is still being triggered which I want to avoid, can anyone help with this?
4 replies
CDCloudflare Developers
Created by Epailes on 3/8/2023 in #workers-help
How to sanitize user input on a worker?
Input will be stored in R2, then rendered to other users, so obviously I need to sanitize it. Likely going to use https://editorjs.io/ on the client, but the server side validation is client agnostic 🙂 I know there's a few options like: https://github.com/apostrophecms/sanitize-html https://github.com/leizongmin/js-xss https://github.com/cure53/DOMPurify Just not sure if anyone can recommend any in case there's any issues getting them going on workers, any polyfills needed etc.
1 replies