Run time config visible in page source
Hi everyone, I'm using public runtime config to store base url of my backend application but client doesn't want the url to be visible in the page source. Nuxt attaches public configs to window object and those are visible in page source. What can be the better way to sotre base url. I'm using graphql.
11 Replies
Alexander Lichter
YouTube
Is Nuxt 3's runtimeConfig UNSAFE?!
π Are you a Nuxt 3 user already and use API keys in your project? In this video, we dive deep into Nuxt 3's runtimeConfig to explore its potential security implications if handled wrongly. Is it safe to use, or are there hidden risks you need to be aware of?
π€π runtimeConfig is a powerful feature in Nuxt 3 that allows you to manage configurati...
@manniL / TheAlexLichter Well explained! I see number 4 on the bulb behind you, does that refer to Nuxt 4 π ?
Hidden clues everywhere π
But no, it is because an "A" and an "L" are a bit hidden in there π
Hahahahaha π oh yeah, playing a lot of games makes us think about hidden clues π
All these things gonna attach env variable to NUXT I know there are ways to see env variables but I don't want it to visible in the page source where it is seen attached with NUXT
put them not in public, but then they can only be accessed during SSR π
Also explained that in above video
I thought I saw the A and L but I was not certain. Nice idea!
Thanks for the reply, I have another question, I have seen your api proxy video that was really helpful but I wanted to ask is their any way to proxy image src urls?
should work the same way π€
yes worked thanks