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

194
Vistas
How to get client full url in AWS lambda through AWS gateway requested by <script src="***"> tag

I am using html script tag to ping AWS gateway endpoint to trigger a function in AWS lambda.

In this lambda function, I need to retrieve the original client's full url. I can get referer data but can't figure out how to get the full url.

I tried to see if there is "origin" info in "event" object but there is no such data.

exports.handler = async (event, context) => {
  return {
    statusCode: 200,
    body: "console.log(" +JSON.stringify(event) +","+JSON.stringify(context) +")"
  };  
}

Here is the client code that pings the http api gateway index.html

<html>
  <script src="http api gateway endpoint" defer async />
  <body></body>
</html>

Now how can I get the client full url in lambda function?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The information sent in a referrer header is restricted for security reasons. You can adjust this with a header or the referrerpolicy attribute.

Note that the <script> element is not a void element. The end tag is mandatory.

<script src="http api gateway endpoint" defer async referrerpolicy"unsafe-url"></script>

You could also generate the <script> element dynamically and pass data from window.location in the query string.

about 4 years ago · Santiago Trujillo 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