N
Nuxt2y ago
Thijs

Static site generation + Secret keys.

Hi! I have a question. How do you handle static site generation with secret keys? Say I want to get some fields from my Directus back-end. Because I need them in my Nuxt component. But the user may not see the secret access token which is required to get those fields. How can you handle something like that?
1 Reply
manniL
manniL2y ago
If you can do all requests "at build time", you can leave the key in your private runtime config. If you have to do dynamic calls in the front end, you have no way around using a backend (pattern: BFF) if you have to hide your API key
Want results from more Discord servers?
Add your server