5 ms·
> is resource bindings for cryptographic keys, ... , so plaintext keys are not visible directly in the worker source code Maybe using ENV like Heroku does woul
by aboutruby 8y ago
> is resource bindings for cryptographic keys, ... , so plaintext keys are not visible directly in the worker source code
Maybe using ENV like Heroku does would work
- aseipp 8y agoUnfortunately there is no way to propagate an environment variable thru a Worker. The closest equivalent is in fact this "resource binding" mechanism I mention -- but it's a bit different -- where as an environment variable binds `FOO=BAR` in an associative dictionary (where you lookup 'FOO'), setting a resource `FOO=BAR` with Workers actually injects a value named `FOO` into your script, which contains a string. So it's just an ordinary JavaScript variable. So it's not injecting environment variables, it's inserting lexical bindings into the script and then running it. But the end results are more or less the same.