cloudflare / worker-template-mysql

Reference demo and modified MySQL driver to connect Cloudflare Workers to a relational database.
Apache License 2.0
49 stars 15 forks source link

globalThis not working within workers-override.ts #1

Closed dominikzach closed 2 years ago

dominikzach commented 2 years ago

Hallo, thanks for this template. I tried it out and without a Tunnel Security set, it works.

Now i want to secure my tunnel so i need to set the: globalThis.CF_CLIENT_ID and globalThis.CF_CLIENT_SECRET Like in the template said.

The 'globalThis' works fine in the normal worker template i can set and get out of it.

BUT those 'globalThis' does not work in the 'workers-override.ts' where the Headers to the tunnel get setted.

grafik

nilslice commented 2 years ago

@dominikzach - thank you for pointing this out. An update has been made to the template which should fix this! Please re-open the issue if that is not the case.