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

631
Visualizações
Express.js doesn't allow more than 6 requests. How do I fix this?

I am working on a website where the person has to login first. On login, I make a fetch POST request to an endpoint defined in the server. When I login, and logout 6 consecutive times, i.e. login - logout - login - logout .. at the 6th time, I logout, and can't login again. The server doesn't accept anymore requests from the client until I refresh the browser, and then it works for 6 more times.

I've read that there is a 5 requests limit imposed on HTTP requests that are not consumed, even though many people said this limit has been removed. I am not using the HTTP module. I am creating my endpoints on the express instance.

Here's a snippet of two of my endpoints:

const app = express();

app.get('/', (req, res) => {
    res.json(getPost('all'))
})

app.post('/register/:user', async (req, res)=>{
   addUser(req.params.user)

})

Can anybody tell me how do I fix this issue? Do I try to increase the number of allowed requests ..? Do I "consume" the requests? How do I do that?

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

0

Add a response to your post request.

app.post('/register/:user', async (req, res)=>{
   addUser(req.params.user); // this function doesn't respond to the request
   res.sendStatus(200); // something like this does!
})
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