cors-anywhere
cors-anywhere copied to clipboard
Making a request with Form Data appears to be getting stripped out
Hi there,
We're making a request that has query string parameters and Form Data, but we're seeing behaviour with CORS Anywhere that seems to be removing the Form Data from the request. We have this header set up:
'Content-Type': 'application/x-www-form-urlencoded'
The following variables set for Form Data:
Username: domain\username Password: password AuthenticationType: FormsAuthentication
We can see in Chrome Dev Tools that the request has the query string parameters, the header has been set and the Form Data is also present. However, we're still getting a 401 Unauthorized.
When we try to go direct (not via the CORS proxy), the request succeeds, however we encounter a CORS issue, hence the reason we need to use CORS-Anywhere.
Any guidance you can provide here would be really appreciate Rob - thank you.
bengrah
@Rob--W Hi Rob, is there any possibility you could provide a response on this? Sorry to push you, but want to make sure we're not doing something stupid or haven't set something up.
bengrah
CORS Anywhere doesn't modify the Content-Type
header nor the request/response body.
Odds are that the API endpoint that you're interacting with is expecting cookies, but my proxy intentionally strips cookies in requests and responses to avoid sharing cookies meant for one (proxied) destination with another.
If this scenario doesn't apply, please share details on the requests and (expected) responses. A small example to reproduce the problem could help as well.