Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Crear solicitud POST antes de redirigir

El objetivo es cuando un usuario visita la ruta de índice / el código JS debe crear la solicitud de publicación y luego redirigir a otra URL proporcionada por la aplicación web del matraz

pero cuando elimino el comentario, sigo siendo redirigido, pero no se inicia ninguna solicitud de publicación

¿Cómo se redirige después de la solicitud de publicación?

Una función js simple para verificar la información del usuario

 <script type="text/javascript"> function lookup() { const URL = '/route'; const xhr = new XMLHttpRequest(); $.get('https://www.cloudflare.com/cdn-cgi/trace', function(data) { data = data.trim().split('\n').reduce(function(obj, pair) {pair = pair.split('='); return obj[pair[0]] = pair[1], obj; }, {}); sender = JSON.stringify(data) xhr.open('POST', URL); xhr.send(sender); //console.log(data); }); } </script> <body onload="lookup()"> </body> <script type="text/javascript" > window.location.href = '{{x}}' ; </script>

Ruta del matraz

 @UI.route('/' ) def index(): if request.method == "POST": return render_template('index.html') else: return render_template('index.html')
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!