-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Mollie on Cloudflare Workers #208
Comments
Thanks for the issue, Jacco! While it does not allow for use outside of Node.js, this is an artificial limitation. In the past, we've seen developers attempting to include this library in client-side websites/apps. Doing so would cause requests to be made to the Mollie servers directly from the user's machine, leaking the API key to the public. This is a severe security risk. The check you've discovered was introduced to prevent developers from shooting themselves in the foot. You are unfortunately collateral damage in this case. To support Cloudflare Workers, we should:
|
Hi @Pimm @jvanmourik, We are in the same situation. We are trying to use Mollie from a Cloudflare worker, build on Node. Is this Mollie Node package fully supported by now? Or does it still require some tweaks for a Cloudflare worker? If we decide to tweak it, what are the risks of breaking when there is an update from Mollie? Thanks for your help :) |
Hi Niels, The library currently contains a check introduced to prevent developers from shooting themselves in the foot. If you remove this check, the library should maybe perhaps work just fine on Cloudflare Workers. However, I haven't tested this yet. And before we announce official support for Cloudflare Workers, I want to test it thoroughly. This is currently high on the backlog. I plan to look into this after the rollout of 3.6.0. I'll keep you up-to-date. If that just sounds too vague and you're willing to get your hands dirty, you are more than welcome to experiment and get involved. The door to my office is always open. Please feel free to step in at any time. (I'm working from home, so ehm… that stepping in part was meant figuratively.) |
Thanks for your response Pimm! Great to hear it's high on the backlog. If we make some progress, I will definitely post it here. |
Would love to see support for this! |
As axios would need to be replaced with fetch (axios doesn't work in Cloudflare Workers), see axios/axios#1219 and slackapi/node-slack-sdk#1335 for similar issues. |
I didn't want to create a new issue, but this problem is also happening on Deno. This runtime doesn't expose a |
Thanks, Renan. |
Any news on this? Cloudflare Worker support would be great. |
Would love to see platform agnostic support! Maybe something like this could help a lot https://github.com/unjs/unenv |
@Pimm Given that 4.0.0 will remove the axios dependency, there's at least one less obstacle here. |
Cloudflare also has announced massively improved Node.js compatibility just two days ago which should make it a lot less work: https://blog.cloudflare.com/more-npm-packages-on-cloudflare-workers-combining-polyfills-and-native-code/ |
Hello, Is it possible to use this package in combination with Cloudflare Workers? Currently it does not allow for use outside the node process, am I correct?
Thanks
The text was updated successfully, but these errors were encountered: