Hello - I'm fairly new to Cloudflare and I'm making my first attempt at using a Worker. The goal is to have the Worker add a SAS token, from an Azure storage account, anytime a specific URL is processed in CF. For example, if the URL is sub.mydomain.com, add the SAS TOKEN (stored as a variable) so that the URL becomes sub.mydomain.com?<SASTOKEN>.
I added the 'export default' block and updated my 'return fetch' line to env.SASTOKEN (instead of just SASTOKEN) as suggested but, I'm still having an issue. First, upon doing that, the code editor is showing that in the env.SASTOKEN, 'env' is not valid/found. Then, if I try to save the code with those changes included, I get an error "unexpected token at 'export'".
So, I'm stuck and not sure what I'm missing or doing wrong. If someone could offer some pointers or direction, it would be greatly appreciated.