Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

90
Vistas
"401 Unauthorized" while rendering an image

I'm getting "401 Unauthorized" when I try to render or download images in a browser in product cards which is templated by EJS. I guess I should send an access token with GET request when I try to access the image to pass authorization but I don't know how to do it. Thanks in advance!

<body>
<% productsCollection.forEach(item => { name = item.name, price = item.salePrices[0].value / 100 + " AZN", itemID = item.id, image = item.customImageLink %>
<div class="card" style="width: 18rem;">
        <img src="<%= image %>" class="card-img-top" alt="...">
        <div class="card-body">
          <h5 class="card-title"><%= name %></h5>
          <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
          <a href="#" class="btn btn-primary"><%= price %></a>
        </div>
      </div>
 <% }) %>
</body>
7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.