#hostname is different in vercel logs than what i have in env

22 messages · Page 1 of 1 (latest)

worthy blaze
#

${process.env.NEXT_PUBLIC_DB_HOSTNAME}

#

wrap `` around

#

fetch(${process.env.NEXT_PUBLIC_DB_HOSTNAME})

fierce silo
#

hmm, this is not jQuerry to use $

quaint timber
#

what Vercel give response to you?

nocturne zealot
#

are you sure you want this env var to be public?

fierce silo
fierce silo
quaint timber
#

btw, if you are using env you need to add, on Vercel Environtment as well

nocturne zealot
# fierce silo for moment, yes

public here means it is accessible from your client-side scripts. that's definitely a major security issue - use a private env var and console.log in server side functions then see the log as above mentioned by Wans

fierce silo
#

now i will tri to add env on vercel too

worthy blaze
#

the hostname contains the key?

quaint timber
fierce silo
#

what i need to do in this case? emails with host support?

quaint timber
fierce silo
#

This is what i did 🙂

fierce silo
#

tried everything, the result is the same 😦

#

don't know what to do

#

this is what i'm geting on api page

quaint timber
#

You may to check your log on dude