Proxy dont work with post action
See original GitHub issueI setup proxy middleware on express. Proxy work as expected with get request. But I can’t use login form in anymore. note: i have rewrite the form action url to my proxy manually.
Setup
- server: express
proxy middleware configuration
var apiProxy = proxy('/proxy', {
target: 'https://m.facebook.com/',
changeOrigin: true,
pathRewrite: { '^/proxy/login.php': '/login.php' },
onProxyReq: (proxyReq, req, res) => {
proxyReq.setHeader( 'User-Agent', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' );
}
});
server mounting
var app = express();
app.use(apiProxy);
app.listen(3001);
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (3 by maintainers)
Top Results From Across the Web
post does not work when behind a proxy - Stack Overflow
The problem isn't with your code. It's a bug in the web-based proxy service you are using. You can't expect services like that...
Read more >Cannot forward Post and PUT request using proxy.web method
getParameter("data") to get my posted data in Java. And then I try @zanaca 's method, but it doesn't work. On Java Server, I...
Read more >App proxy doesn't send a request as it should
You can do POST or GET. It is your choice. The App Proxy does not care. It is simply a wrapper and forwards...
Read more >Proxy doesn't work after upgrade to SDK 9 - Apple Developer
We have a problem with accessing servers in the mobile network which uses proxy. Before SDK 9 everything was working like a charm...
Read more >Set up Lambda proxy integrations in API Gateway
Learn how to configure a Lambda proxy integration request and integration response in API Gateway.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
POST requests are supported. Some issues might occur if your using
body-parser
for example. In those cases make sure you’ve configured/mount the proxy prior to the body-parser.Issue has gone stale; Closing issue. Feel free to re-open.
Thanks.
PS: I think StackOverflow would be a better place to troubleshoot your setup.