where can i put my hasura secret key in nuxt? before I am using vue js and this is how it works with websocket but I'm confused how to config in nuxt with hasura
const httpLink = new HttpLink({ uri: "https://", headers: { 'x-hasura-admin-secret': '' } });
const wsLink = new WebSocketLink({ uri: "wss://", options: { reconnect: true, timeout: 30000, connectionParams() { return { headers: { 'x-hasura-admin-secret': '' } } } } })
hey, sorry only seeing this now. the secret key should be a secret so should go in Netlify / Heroku or where you have it hosted as env variable.
see if this helps dev.to/debs_obrien/securing-your-h...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
where can i put my hasura secret key in nuxt?
before I am using vue js and this is how it works with websocket but
I'm confused how to config in nuxt with hasura
const httpLink = new HttpLink({
uri: "https://",
headers: {
'x-hasura-admin-secret': ''
}
});
const wsLink = new WebSocketLink({
uri: "wss://",
options: {
reconnect: true,
timeout: 30000,
connectionParams() {
return {
headers: {
'x-hasura-admin-secret': ''
}
}
}
}
})
hey, sorry only seeing this now. the secret key should be a secret so should go in Netlify / Heroku or where you have it hosted as env variable.
see if this helps
dev.to/debs_obrien/securing-your-h...