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

216
Vistas
Java script window open with authorization header

I was trying out to open a grafana url from the javascript by embedding auth inside. Grafana expects the authorisation header to open, i have tried the following code but it is not working. Can someone help how can we fix this ?

onClick={function() {
var that = window;
$.ajax({
url: "http://localhost:3000",
type: "GET",
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic " + btoa("admin" + ":" + "admin"));},
success: function(oRes) { that.open(oRes,"_blank");}
});
}
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