secrets: `.env.SECRET_NAME` or `context.env.SECRET_NAME`
I have a
.dev.vars
locally with some secrets, and Wrangler is telling me they're available, however in my worker I've tried both ${env.SECRET_NAME}
and {context.env.SECRET_NAME}
, neither of which is resolving.
Does anyone know what might be the issue? Since the documentation mentions both approaches, I am suspicious that either might be incorrect.2 Replies
Where are you trying to use the secrets?
Just solved it, thanks. I didn't realise I needed to get it from the incoming request