Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 28 09:20
    remvee commented #1011
  • Feb 15 12:16
    prof2k edited #1008
  • Feb 15 12:16
    prof2k edited #1008
  • Feb 15 12:14
    prof2k edited #1008
  • Feb 15 12:12
    prof2k edited #1008
  • Feb 15 12:11
    prof2k edited #1008
  • Feb 15 12:10
    prof2k commented #1008
  • Feb 15 12:10
    prof2k commented #1008
  • Feb 15 12:10
    prof2k edited #1008
  • Feb 15 12:09
    prof2k edited #1008
  • Feb 13 23:57
    dependabot[bot] labeled #1041
  • Feb 13 23:57
    dependabot[bot] opened #1041
  • Feb 13 23:57

    dependabot[bot] on npm_and_yarn

    Bump follow-redirects from 1.14… (compare)

  • Feb 13 21:02
    dependabot[bot] labeled #1040
  • Feb 13 21:02
    dependabot[bot] opened #1040
  • Feb 13 21:02

    dependabot[bot] on npm_and_yarn

    Bump ajv from 6.10.2 to 6.12.3 … (compare)

  • Feb 12 08:00
    prof2k edited #1008
  • Feb 12 07:59
    prof2k edited #1008
  • Feb 07 20:59
    m-balaban opened #1039
  • Jan 25 03:00
    gizmo49 commented #1032
Mauro de Pascale
@mdepa
Hi all, I'm exploring EQ as an option for a kubernetes project: is it possible to configure EG to perform TLS edge termination ? So the connection is protected up to the gateway and just http to the hidden service ? Sorry if the question sounds silly: I'm new to the tool.
Nuengnakhap
@Nuengnakhap
how to fix PayloadTooLargeError: request entity too large ?
shivam sharma
@Mr-4evER
hey, any idea for express-gateway on windows, it says eg is not working
1 reply
Krishna M
@krishna-gennext_gitlab
Hi
Please help for this error PayloadTooLargeError: request entity too large express api gateway
2 replies
RaedMou
@RaedMou
Hello, is there some documentation / articles about integrating a service discovery or service mesh with EG ?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Not that Im aware of, RaedMou
RaedMou
@RaedMou
@samuelkitazume:matrix.org Do you have some implmentation propositions ?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Not actually. That is something I wanted a while ago, but didnt have the budget to revisit. That would be awesome to have
Krishna M
@krishna-gennext_gitlab
Screenshot from 2021-07-09 10-20-58.png
Please help this error
shivam sharma
@Mr-4evER
@krishna-gennext_gitlab increase the limit of the middleware parser
Krishna M
@krishna-gennext_gitlab
is there any configuration?
Linus6
@Linus6
Hi, is there any way to check endpoint exists or not ? Currently its giving cors error. (front tries to access Endpoint which is not registered in config).
shivam sharma
@Mr-4evER
@krishna-gennext_gitlab go check express.json() in documentation of express, there you find a property name limit for express.json implement that
shivam sharma
@Mr-4evER
@Linus6 there is a http request TRACE, go check that out.
Linus6
@Linus6

Hi,
I have this config

apiEndpoints:
storeMs_send:
path: "/storems/store/order"
methods: ["POST", "OPTIONS"]

storemsapi:
apiEndpoints:

  - storeMs_send
policies:
  - cors:
      - action:
          origin: "*"
  - body-parser:
  - token-validation:
  - proxy:
      - action:
          serviceEndpoint: storems
          changeOrigin: true

serviceEndpoints:
storems:
url: ${STORE_MS_URL}

If front-end makes request to "/storems/store/orderAll"(unregistered endpoint in gateway).
Idealy it should return 404 but Gateway is returning CORS error(as cors is first policy in pipeline).
Intruducing a wildcard path would solve it(returns 404) but, is this the right way.

aneesh-rastogi
@aneesh-rastogi
Hey

I am trying to install a plugin using the command:
eg plugin install express-gateway-plugin-keycloak-connect

But I am getting the below error:
Just found a .yo-rc.json in a parent directory.
Setting the project root at: /Users/aneeshrastogi/my-gateway
Configuring yargs through package.json is deprecated and will be removed in a future major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in a future major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in a future major release, please use the JS API instead.
node:internal/modules/cjs/loader:943
throw err;
^

Error: Cannot find module 'Run npm audit for details.'
Require stack:

  • /Users/aneeshrastogi/my-gateway/node_modules/express-gateway/lib/plugin-installer.js
  • /Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/generators/plugins/configure.js
  • /Users/aneeshrastogi/my-gateway/node_modules/yeoman-environment/lib/store.js
  • /Users/aneeshrastogi/my-gateway/node_modules/yeoman-environment/lib/environment.js
  • /Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/environment.js
  • /Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.Module._load (node:internal/modules/cjs/loader:773:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at ChildProcess.<anonymous> (/Users/aneeshrastogi/my-gateway/node_modules/express-gateway/lib/plugin-installer.js:94:33)
    at ChildProcess.emit (node:events:365:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/aneeshrastogi/my-gateway/node_modules/express-gateway/lib/plugin-installer.js',
    '/Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/generators/plugins/configure.js',
    '/Users/aneeshrastogi/my-gateway/node_modules/yeoman-environment/lib/store.js',
    '/Users/aneeshrastogi/my-gateway/node_modules/yeoman-environment/lib/environment.js',
    '/Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/environment.js',
    '/Users/aneeshrastogi/my-gateway/node_modules/express-gateway/bin/index.js'
    ]
    }
    node:child_process:729
    throw err;
    ^

Error: Command failed: /Users/aneeshrastogi/my-gateway/node_modules/.bin/eg plugin install express-gateway-plugin-keycloak-connect
at checkExecSyncError (node:child_process:707:11)
at execFileSync (node:child_process:726:15)
at exports.executeInScope (/usr/local/lib/node_modules/express-gateway/bin/execution-scope.js:37:5)
at Object.exports.bootstrap (/usr/local/lib/node_modules/express-gateway/bin/environment.js:11:7)
at Object.<anonymous> (/usr/local/lib/node_modules/express-gateway/bin/index.js:9:46)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Function.Module._load (node:internal/modules/cjs/loader:828:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 47993,
stdout: null,
stderr: null
}

I have installed node multiple times on my system, but I am still not able to install any express gateway plugins.
Can anyone help with this, please?
aneesh-rastogi
@aneesh-rastogi
I was able to resolve it by removing node_modules and package-lock.json inside the folder where gateway is installed and then using npm install
Earlier I was removing them from the place they were installed after installing node
Teelon
@Teelon
im using express-gateway fine on my local machine but when it deploy it to my online hosting it doesn't work the same. is there any documentation on deploying ? i cant seem to find any
Musabbir Mamun
@musabbir_gitlab

2021-09-09T12:51:24.392Z [EG:gateway] info: gateway http server listening on :::8080
node:events:355
throw er; // Unhandled 'error' event
^

Error: listen EACCES: permission denied 127.0.0.1:9876
at Server.setupListenHandle [as _listen2] (node:net:1293:21)
at listenInCluster (node:net:1358:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1496:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:8)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1337:8)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 'EACCES',
errno: -4092,
syscall: 'listen',
address: '127.0.0.1',
port: 9876
}

I'm getting this error. What to do? TIA

Akhil Kulshrestha
@akul0108
I'm using express-gateway that is working fine in localhost but it's not working in hosting server. is there any documentation for deployment in hosting server??
Safwen
@trabelsi_safwen_twitter
Hello, does express gateway support WebSocket connections?
Saif Ur Rahman
@saifsmailbox98
Hi, how to log the whole request? Method, URL, Query Params, Headers, Body, etc?
pipelines:
  corePipeline:
    apiEndpoints:
      - coreApi
    policies:
      - log:
          - action:
              message: "${req.method} ${req.originalUrl} ${JSON.stringify(req.headers)} ${JSON.stringify(Object.keys(req))} ${JSON.stringify(req.complete)}"
      - proxy:
          - action:
              serviceEndpoint: coreService
              changeOrigin: true
              preserveHeaderKeyCase: true
this is what I tried but couldn't get the body, etc
Rustam Islamov
@rust4m
hello everyone , i have difficulties with getting service response body in express gateway, can anyone help me please
Jennifer Kirchner
@jennkirchner
I'm looking for an example of using express-gateway to compose some of my express REST microservices. I essentially want to use 4 REST endpoints composed into one response via another REST endpoint
Wojciech Łukasiewicz
@wojtuch_gitlab

hello! does anyone know if it's possible to only execute the first action within a policy whose condition has been matched? to give an example:

policies:
  ...
  proxy:
    - condition:
        name: expression
        expression: 'some_expression'
      action:
        serviceEndpoint: serviceEndpoint1
    - condition:
        name: pathMatch
        pattern: 'some_pattern'
      action:
        serviceEndpoint: serviceEndpoint2
    - action:
        serviceEndpoint: defaultServiceEndpoint

what I'd be aiming to achieve is to use different service endpoints depending on some conditions

sonia-elear21
@sonia-elear21

Want to track api response from express-gateway,
I checked with response transformer as well , there also getting 200 when I am nocking as 400,
as well as tried to create new policy and console the response there also i am getting the same kind of result,
As i am using proxy at last so to redirect to particular service;
I am unable to use any policy after proxy and i want the response coming from that service proxy redirecting to and according to response i need to call some function;

Could you please help me to know if its achievable then how.

akasaa
@akasaa101
Carlos Cano
@charlykno64
Hi! I'm using express-gateway with docker and it's working with the httpbin example. I added a new one apiendoint and all the other stuff needed but it's not working (the httbin it's still working) so I decided that I need to use the Logs but it didn't work only the "info: change event" appears in the console. How can I debug my work?
btw the serviceendpoint it's working
Alireza Nasseh
@alirezanasseh:matrix.org
[m]

Hello guys
I'm new to express gateway, I've created login in my user service and created oauth2 credentials in gateway, got the secret key and store it as httpOnly cookie on client. Now I have a protected route that I want authenticated users be able to work with, here is my code in gateway config file :

users:
    apiEndpoints:
      - users
    policies:
      - oauth2:
      - proxy:
          - action:
              serviceEndpoint: users

But it doesn't recognize secret from client cookie. How can I make it work?
Thanks.

Harsh Kanjariya
@harshkanjariya
I am getting same error as @aneesh-rastogi but i cannot get rid of it. I've tried removing gateway and removing node_modules and reinstalling everything but error still same.
pdeluca93
@pdeluca93

Hello, i can't proxy websockets.

    policies:
      - proxy:
          - action:
              serviceEndpoint: core_v1 
              changeOrigin: true
              ws: true

The endpoint is also exposed under apiEndpoints.

What i am missing? Thanks.

jolquera
@jolquera
var code = "http:
  port: '${PORT:-8080}'
apiEndpoints:
  auth:
    path: /signin
    methods:
      - POST
  public:
    methods: 'GET,POST,PUT,DELETE'
    paths:
      - /public/*
  private:
    methods: 'GET,POST,PUT,DELETE'
    paths:
      - /private/*
  rol:
    methods: 'GET,POST,PUT,DELETE'
    paths:
      - /rol/*
  usr:
    methods: 'GET,POST,PUT,DELETE'
    paths:
      - /usr/*
serviceEndpoints:
  auth:
    url: 'http://api-demo.herokuapp.com/api/auth'
  public:
    url: 'http://api-demo.herokuapp.com/api'
  private:
    url: 'http://api-demo.herokuapp.com/api'
  rol:
    url: 'http://api-demo.herokuapp.com/api'
  usr:
    url: 'http://api-demo.herokuapp.com/api'
policies:
  - cors
  - log
  - proxy
  - jwt
  - request-transformer
pipelines:
  authPipeline:
    apiEndpoints:
      - auth
    policies:
      - log:
          action:
            message: '${JSON.stringify(req.headers)}'
      - cors:
          action:
            origin: '*'
            methods: 'PUT,POST,GET,DELETE,OPTIONS'
            allowedHeaders: ['Content-type','Authorization','Origin','Access-Control-Allow-Origin','Origin', 'Accept', 'X-Requested-With', 'Content-Type', 'Access-Control-Request-Method', 'Access-Control-Request-Headers','Authorization', 'Access-Control-Allow-Origin','X-TEST']
            exposedHeaders : ['Content-type','Authorization','Origin','Access-Control-Allow-Origin','Origin', 'Accept', 'X-Requested-With', 'Content-Type', 'Access-Control-Request-Method', 'Access-Control-Request-Headers','Authorization', 'Access-Control-Allow-Origin','X-TEST']
            preflightContinue: true
            optionsSuccessStatus: 200
      - proxy:
          action:
            serviceEndpoint: auth
            changeOrigin: true
  publicPipeline:
    apiEndpoints:
      - public
    policies:
      - cors:
          - action:
              origin: '*'
              methods: 'HEAD,PUT,PATCH,POST,DELETE'
              allowedHeaders:
                - Content-Type
                - Authorization
      - log:
          action:
            message: 'header===> ${req.headers.authorization}'
      - jwt:
          action:
            secretOrPublicKey: 'fsdfsdfs#$#5353gergf>54354343'
            checkCredentialExistence: false
      - request-transformer:
          action:
            body:
              add:
                user: req.user
      - proxy:
          action:
            serviceEndpoint: public
            changeOrigin: true
  privatePipeline:
    apiEndpoints:
      - private
    policies:
      - cors:
          - action:
              origin: '*'
              methods: 'HEAD,PUT,PATCH,POST,DELETE'
              allowedHeaders:
                - Content-Type
                - Authorization
      - log:
          action:
            message: 'header===> ${req.headers.authorization}'
      - jwt:
          action:
            secretOrPublicKey: 'fsdfsdfs#$#5353gergf>54354343'
            checkCredentialExistence: false
      - request-transformer:
          action:
            body:
              add:
                user: req.user
      - proxy:
          action:
            serviceEndpoint: private
            changeOrigin: true
  rolPipeline:
    apiEndpoints:
      - rol
    policies:
      - cors:
          - action:
              origin: '*'
              methods: 'HEAD,PUT,PATCH,POST,DELETE'
              allowedHeaders:
                - Content-Type
                - Authorization
      - log:
          action:
            message: 'header===> ${req.headers.authorization}'
      - jwt:
          action:
            secretOrPublicKey: 'fsdfsdfs#$#5353gergf>54354343'
            checkCredentialExistence: false
      - request-transformer:
          action:
            body:
              add:
                user: req.user
      - proxy:
          action:
            serviceEndpoint: rol
            changeOrigin: true
jolquera
@jolquera
Hi, I can't get cors to work on localhost:4200, could someone help me find out what's wrong?
darylangg
@darylangg
Hi, I'm looking to enable HSTS on my gateway, where am I able to specify this header?
sgnm-haydar
@sgnm-haydar
hi ı want to integrate my express-gateway with keyclock how can ı do that?
pdeluca93
@pdeluca93
Hi, is there a way to Proxy a websocket endpoint?
I tried with ws: true but that did not work
Niv Lusky
@NivL1
Hi, I use express gateway to manage services gateway. As part of one of the services there is a GET endpoint that returns a file. Fore some reason it seems that the gateway often returns a cached file without requesting it from the service. Any suggestions how to disable it or any other enlightenment? Thanks!
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
The cache is hardly from the gateway. Most likely it’s the browser caching the route
Niv Lusky
@NivL1
True, my fault. thanks.
Pushpak Chhajed
@pushpak1300
Hi, is there a way to get an express instance for adding different services for eg. sentry ?
julianomajally
@julianomajally
Hello Guys, i am trying to add all subdomains in CORS but i am not succeeding
can you please help ?