Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda