Unfortunately 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.
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.