reverse-proxy-demo | easily create a conditional reverse proxy | Proxy library
kandi X-RAY | reverse-proxy-demo Summary
kandi X-RAY | reverse-proxy-demo Summary
A tutorial meant to show how you can easily use Go's standard library to create a simple reverse proxy.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of reverse-proxy-demo
reverse-proxy-demo Key Features
reverse-proxy-demo Examples and Code Snippets
Community Discussions
Trending Discussions on reverse-proxy-demo
QUESTION
Example code is available on https://github.com/baumgarb/reverse-proxy-demo The README.md explains how you can re-produce the issue if you clone the repo.
I have an API Gateway and a downstream service which returns todos (TodosAPI). A client goes through the API Gateway to access the downstream service.
The API Gateway is leveraging the http-proxy-middleware
package to proxy the requests. There are two implementations and the 2nd one is not working:
1. Global middleware in main.ts
which kicks in on path /api/v1/...
This approach works perfectly fine and it proxies all requests to the downstream service no matter what http method (GET, PUT, ...).
...ANSWER
Answered 2019-Nov-25 at 07:27I've finally figured out the problem. It seems to be related to the body parser. If I change the API Gateway to turn off the body parser the request is forwarded successfully.
So the solution was to replace
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install reverse-proxy-demo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page