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

183
Visualizações
Hide contact form post reuqest from developer console

I have made a contact form that uses AJAX to submit, but when sending the data it shows up in the network tab, with this people can spam the contact form by directly sending data to that address with the correct data. How can I prevent this? I saw something about a token system, but that would show up in the post request aswell.

Thanks in advance

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

0

That's not possible. You can certainly obfuscate things (and for example, if you're sending a proper POST request, you won't be able to see the values being sent, just the endpoint URL), but if you think about it, you need to eventually tell the client where it can submit its query to, and the user always has full control over the client, so they'll always be able to see that.

In reality, this is a non-issue because you can trivially invalidate requests that you don't want. For example, on your server you can check that they send some token which expires after some amount of time along with their request, or you can e.g. block all requests from a single IP address if they send too many in quick succession, etc.

You mention that this is a contact form --- I'm sure on the internet you've run across reCaptcha input fields (where you have to solve a trivial problem like selecting all of the traffic lights in a grid of pictures), and they exist to solve the same problem of proving it is an actual human submitting each request. I'd recommend looking into that if you want a simple solution and don't want / need logins.

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