GithubHelp home page GithubHelp logo

Comments (2)

kele1997 avatar kele1997 commented on August 19, 2024

I met the same issue.
To sovle this, you need to know two things:

  1. this app will send request to kong admin api, but this request is not send from the app's ip, but your browser's ip, so make sure your browser can send request to kong admin api successfully.
  2. maybe you use the lastest kong , and this app seems does't update in time. so you can modify it by your self.

before modify

if (json_response.data.length == 1) {
application_name = json_response.data[0].name;
}
}
callback(application_name);
});
}

after modify

   if (json_response.data.length == 1) { 
+        console.log(json_response); // print json_response, if json_response =='{"message":"not found"}', it seems your browser can't send request to kong admin api
+        application_name = json_response[name];
-        application_name = json_response.data[0].name; 
       } 
     } 
     callback(application_name); 
   }); 
 } 

from kong-oauth2-hello-world.

josepereira1 avatar josepereira1 commented on August 19, 2024

you should check first if json_response.data is not undefined, before invoke length, without this, server can fail:
if (json_response.data && json_response.data.length == 1) { application_name = json_response.data[0].name; }

from kong-oauth2-hello-world.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.