Hi
Our Cloud Gateway not correctly proxying requests.
On any request matching to the specific rout predicate, it was returning code 200 and no response body, even for invalid or non-existing endpoints
Config example:
gateway:
routes:
- id: notification
uri: some-our-notification-service.com
predicates:
- Path=/notification/**
filters:
- RewritePath=/notification(?<path>.*), /$\{path}
so any request to:
https://our-api-gateway.com/notification/any-valid-or-no-existing-endpoint
return code was 200 and the response body was blank.
After we added http:// prefix to route URI:
gateway:
routes:
- id: notification
uri: http://some-our-notification-service.com
predicates:
- Path=/notification/**
filters:
- RewritePath=/notification(?<path>.*), /$\{path}
it fixed the issue.
Even though URI requires schema definition and it was our fault to skip it, I would imagine it should throw an exception stating that configured URI is wrong, or even better resolve missing http:// prefix automatically.
But not returning a valid response with code 200 and empty body, as such response very much misleading and confusing, especially other services which using Gateway and thinks that request was successful because of response code.
Hi
Our Cloud Gateway not correctly proxying requests.
On any request matching to the specific rout predicate, it was returning code 200 and no response body, even for invalid or non-existing endpoints
Config example:
so any request to:
https://our-api-gateway.com/notification/any-valid-or-no-existing-endpointreturn code was 200 and the response body was blank.
After we added
http://prefix to route URI:it fixed the issue.
Even though URI requires schema definition and it was our fault to skip it, I would imagine it should throw an exception stating that configured URI is wrong, or even better resolve missing
http://prefix automatically.But not returning a valid response with code 200 and empty body, as such response very much misleading and confusing, especially other services which using Gateway and thinks that request was successful because of response code.