Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Saravana Kumar
    @saravana87
    when I try this <ipaddress>:8080/ip
    its showing error
    Cannot GET /ip
    Tek Loon Cheah
    @TekLoonCheah_twitter
    Did u change the host under api:
    apiEndpoints:
     api:
       host: <your ip address>
       paths: '/ip'
    Saravana Kumar
    @saravana87
    Thank you. its working now.
    Tabish Imran
    @tabish_imran8_twitter
    Quick question, Can you create apps without creating users?
    The API that I'm working on will be consumed by android apps, When a new app is registered on my frontend, i would like to do an API call and add that app to express-gateway, I keep getting the "The specified user does not exist" error.
    Tek Loon Cheah
    @TekLoonCheah_twitter

    @tabish_imran8_twitter Hi, I look thru the documentation. It seem cannot. Everytime u create an app u have to specify the app belong to which user

    https://www.express-gateway.io/docs/cli/apps/create/

    kishore-gara
    @kishore-gara

    One question - I was trying to understand how I can configure express gateway to handle service down issues. For e.g. when the service is down then it is throwing bad gateway error. Instead I would like to see other possibilities - 1) If there are more than one service end point then it should serve from other active end point 2) Instead of bad gateway error there should be a mechanism to handle with the better presentation.

    Any documentation or clues related to that if it is possible in express gateway?

    ra7eem1
    @ra7eem1

    Hello Everyone, i have a quick question,

    I'm trying to start installing the back-end and front-end of express gateway but it's somehow confusing, is there any demo videos or anything helps?

    kishore-gara
    @kishore-gara
    @ra7eem1 I have used the information and video available at https://www.express-gateway.io/getting-started/ and able to install its back-end successfully. I am using it for one of the project right now. Hope this information helps!
    kishore-gara
    @kishore-gara

    @ra7eem1 I have used the information and video available at https://www.express-gateway.io/getting-started/ and able to install its back-end successfully. I am using it for one of the project right now. Hope this information helps!

    In extension to this I could see admin related end-points also working properly without any issues. One such example that you can try is:
    curl localhost:9876/service-endpoints

    and it worked perfect for me.

    bugf1nd3r
    @bugf1nd3r
    Hi, I am installing express gateway on my local... after setup express gateway.. I am able to run gateway on both ports.. now when I try to setup consumer with command eg users create.. I am getting following error
    Error: data.pipelines['default'].apiEndpoints[0] should be string
    I didn't change anything else apart from what have been mentioned in getting started guide
    kishore-gara
    @kishore-gara
    @bugf1nd3r Somehow I feel this error is self-explanatory. If you could share your config file then I can give it a shot. FYI: I am not an expert but a learner
    bugf1nd3r
    @bugf1nd3r
      port: 8080
    admin:
      port: 9876
      host: localhost
    apiEndpoints:
      api:
        host: localhost
        paths: '/ip'
    serviceEndpoints:
      httpbin:
        url: 'https://httpbin.org'
    policies:
      - basic-auth
      - cors
      - expression
      - key-auth
      - log
      - oauth2
      - proxy
      - rate-limit
    pipelines:
      default:
        apiEndpoints:
          - api:
              host: 'localhost'
              paths: '/ip'
        policies:
        # Uncomment `key-auth:` when instructed to in the Getting Started guide.
        # - key-auth:
          - proxy:
              - action:
                  serviceEndpoint: httpbin 
                  changeOrigin: true
    kishore-gara
    @kishore-gara
    @bugf1nd3r Replace your gateway config file with the following:
    http:
     port: 8080
    admin:
      port: 9876
      host: localhost
    apiEndpoints:
      api:
        host: localhost
        paths: '/ip'
    serviceEndpoints:
      httpbin:
        url: 'https://httpbin.org'
    policies:
      - basic-auth
      - cors
      - expression
      - key-auth
      - log
      - oauth2
      - proxy
      - rate-limit
    pipelines:
      default:
        apiEndpoints:
          - api
        policies:
        # Uncomment `key-auth:` when instructed to in the Getting Started guide.
        # - key-auth:
          - proxy:
              - action:
                  serviceEndpoint: httpbin 
                  changeOrigin: true
    As mentioned error was self explanatory. I have shared the complete config so that you can just replace :D
    bugf1nd3r
    @bugf1nd3r
    Thanks @kishore-gara for your help.. I found my mistake.. that I added localhost/ip at default level as well.. which was not required
    kishore-gara
    @kishore-gara

    One question - I was trying to understand how I can configure express gateway to handle service down issues. For e.g. when the service is down then it is throwing bad gateway error. Instead I would like to see other possibilities - 1) If there are more than one service end point then it should serve from other active end point 2) Instead of bad gateway error there should be a mechanism to handle with the better presentation.

    Any documentation or clues related to that if it is possible in express gateway?

    Any experts who can share their knowledge on this?

    vipreshjha
    @vipreshjha
    How are the Service End point's handled ( Downtime, Scheduling(round robin, priority, auto discovery etc.)?
    Any documentation in this regard will be appreciated
    Also is it possible to communcate with local services on RPC, i mean any options avaliable other then "http"?
    bugf1nd3r
    @bugf1nd3r
    How to implement own Authentication in API Gateway. E.g. I have Web service which validates username/password and this service is hosted on company's infrastructure... So how can I use this Web service in API gateway to authenticate and generate JWT token after authentication?
    GotzonHidalgo
    @GotzonHidalgo

    I need to use Express-gateway for GET and POST requests. In the POST requests, files are sent to the body but they don't reach the final service.

    I'd like to know if Express-Gateway do that by default. If not, Can you tell me the steps to get it?

    Patrik Burian
    @xlatt

    Hi, I am running EG in docker and I am trying to run example plugin as is shown here https://www.express-gateway.io/docs/plugins/plugin-development/ but I am running in to this issue

    error: Failed to load plugin express-gateway-plugin-example: Error: Cannot find module 'express-gateway-plugin-example' from parent

    this is shown after I edit system.config.yml. I can see that example plugin is downloaded to the /var/lib/eg/node_modules. Can anyone help?

    souravprakashjena
    @souravprakashjena
    did you modify the express-gateway-plugin-example?
    Patrik Burian
    @xlatt
    I solved it already, thing is that I need to use my own plugin which is available only locally. So I started container with EG, copied plugin to /var/lib/eg and then executed eg plugin install example. This did not work and produced error shown above. Solution was to put it to
    /usr/local/share/.config/yarn/global/node_modules and leaving just name of the plugin in the system.config.yml and not using "package" option with path to manifest.js
    Christian Palazzo
    @g3k0
    Hello, I am doing a POC of a microservices app built in loopback 4...the need is to have some api protected by basic auth and other api protected by jwt..I am little bit confused about auth with express-gateway. Since the users and roles are models managed by one of the microservices...is it possible to implement custom authentications in the gateway that will use the rest api exposed by the microservice?
    Vincenzo Chianese
    @XVincentX
    @g3k0 Not right now. You'd need to write a custom plugin but it won't be that easy
    Cody robinson
    @codrobinson_twitter
    So @XVincentX does express gateway store user information and their creds/scoping in redis? like if i create a user and assume a scope to them, that is persisted in redis?
    Vincenzo Chianese
    @XVincentX
    Yes
    rpsimon
    @RPSimon
    Does anyone expose express gateway directly to the internet. Or are you running it behind some other service? I have deployed it on an docker swarm for testing at the moment. But I'm ensure if it is safe to expose the express gateway directly to the interne
    *internet
    Cody robinson
    @codrobinson_twitter
    So @XVincentX say i create an key-auth for an app and redis restarts, isn't that cache lost and i would have to create a new key-auth for that app?
    Scott Plunkett
    @plunkettscott
    Is there an easy way to proxy /api/system/about to a backend service with the name api-system-about?
    Without having to specify exact route matches, that is
    Patrik Burian
    @xlatt

    I have url regex match in my plugin which lools like this:
    /download/urn\:\x-ch-content\::uri([a-z0-9-]+\:[a-z0-9-]+)\?qid=:qid([a-z0-9-]+)

    I tested it with example on this site

    example:
    /download/urn:x-ch-content:2b94308a-70b3-349a-88f6-580a4652b6be:1e6c7873-5740-3ca9-8763-f6e909c3ba6d?qid=7211394c-68fb-42d9-8289-18818f23012b

    I am passing the regex path to plugin via environment variable. It is passed correctly but when I test it with curl I get "Cannot GET ...". Itried passing it as JS regex object using // and also triming whitespaces. Did not help.
    Any suggestions what am I missing?

    Facundo Miquel
    @fmq

    Hello, I was wondering if there is a way to support multiple authentication policies for a given Service, I want my Microservices to communicate via the API using key-auth and my users to Use JWT tokens, when I use each policy independently they work fine but when I do
    policies:

      - jwt:
        - action:
            secretOrPublicKey: 57sH1fnB5p6NhYgMP7H8JO
            checkCredentialExistence: false
      - key-auth:
        - action:
            apiKeyHeaderScheme: ''
            disableHeadersScheme: true
      - proxy:
    I get an 401: Unauthorized

    Thanks!

    Brian Ploetz
    @bploetz
    Question about the request-transformer policy: I'm currently using this to add a header to the downstream request, and that's working fine, but now I want to add a few more headers. I can't for the life of me figure out the right syntax to add multiple headers. Does anyone have an example of how to do this?
    Brian Ploetz
    @bploetz
    nevermind, user error :)
    Vincenzo Chianese
    @XVincentX
    Cool! :)
    Johnbosco Ohia
    @johnchuks
    Hello @XVincentX . Very cool package you have got here. I have some questions regarding setting up JWT authentication with my api-gateway. I currently have a user-service that user can signup and login and a ratings service as well. Is it possible to make specific areas of my user service restricted to authenticated users and other areas public? Also how can I integrate my signup and login flow with express-gateway?
    duythiensl
    @duythiensl
    https://jsonblob.com/5b403fda-c32e-11e9-9745-8526e4b13e36
    this is my gateway.config.json file,when i request : localhost:3147/ip → respose is :"origin": "113.160.0.10, 113.160.0.10"
    but when I requested with ajax, I did get an error response with content: Access to XMLHttpRequest at 'http://localhost:3147/ip' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    What is happen?? I should be doing to fix it?? Please help me!!! thank you so much...
    duythiensl
    @duythiensl
    image.png
    this is my jquery's content, that I used to test.
    Dumindu Gunawardana
    @DuminduSandaruwan
    is there an any document explain that how to develop plugin as a main module?
    Ravi
    @ravikantmishra
    Hi @johnchuks , did you get any solution. I also have a similar requirement.
    Martin Joseph
    @amjoesph
    Does express-gateway provide application metrics out of the box or does it need a plugin development?
    Vincenzo Chianese
    @XVincentX
    No, you need to write your own plugin