Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
Hide/remove Next.js runtimeConfig in network calls -> document -> response

I am using .yml files in my next.js because of docker and using these .yml configurations in next.js runtimeConfig. These configs can be seen in browser network tab as these are attached with document response.

I know about the serverSideConfigs but some of the configurations needs to be used on front-end so I can't put them in serverSideConfig.

Is there any way I can hide these runtimeConfigs in network calls response?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can put all sensitive information in serverRuntimeConfig instead of publicRuntimeConfig in next.config.js

module.exports = {
    serverRuntimeConfig: {
     // Will only be available on the server side
      mySecret: 'secret',
      secondSecret: process.env.SECOND_SECRET, // Pass through env  variables
    },
    publicRuntimeConfig: {
     // Will be available on both server and client
      staticFolder: '/static',
    },
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda