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

282
Views
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
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!