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

283
Vistas
Axios basic HTTP auth asking for credentials twice

I have an nginx reverse proxy for an application with HTTP Basic Auth set up. In my frontend web app, the authentication works with axios ( status code 200 ), but after setting the iframe source the browser window asks for the credentials again. Why is that happening when Im already authenticated ?

enter image description here

Here is my Vue component.

<template>
  <div>
    <v-container>
      <iframe
        v-if="authenticated"
        :src="grafana_url"
        width="450"
        height="200"
        frameborder="0"
      ></iframe>
    </v-container>
  </div>
</template>
import axios from 'axios';
export default {
  data() {
    return {
      authenticated: false,
      grafana_url: '',
    };
  },
  async created() {
    var self = this;
    var config = {
      method: 'GET',
      url: 'https://grafana.webapp.com',
      auth: {
        username: 'user',
        password: '123456',
      },
    };
    await axios(config)
      .then(function (response) {
        console.log(response.status);
        self.grafana_url =
          'https://grafana.webapp.com/d-solo/panelId=2';
        self.authenticated = true;
      })
      .catch(function (error) {
        console.log(error);
      });
  },
};
about 4 years 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 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