ProxymanApp / ProxymanApp/Proxyman
jwt string in request body gets converted to json payload when scripting is enabled
Open
@NghiaTranUIT is already working on this.
Since Dec 23, 2023.
✅ Done
bug
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm working with an API that uses custom "Content-Type" header and the request body is a jwt string.
Whenever I enable Scripting, the jwt in the body gets converted to a json payload. My script does not even contain any logic that modifies the request.
async function onRequest(context, url, request) {
return request;
}
Steps to Reproduce
- Enable Scripting
- run:
curl -X POST https://www.example.com -H "Content-Type: application/my-custom-type" --data-raw "eyJzdGF0dXMiOiJydW5uaW5nIiwiYWN0aW9ucyI6W3sidHlwZSI6InNldCIsIm91dHB1dCI6Imxpbmtfc291cmNlIiwidmFsdWUiOiJkZWZhdWx0IiwiZG9uZSI6dHJ1ZX1dfQ==" --proxy http://localhost:9090
Current Behavior
Payload is altered:
Expected Behavior
request body should remain as eyJzdGF0dXMiOiJydW5uaW5nIiwiYWN0aW9ucyI6W3sidHlwZSI6InNldCIsIm91dHB1dCI6Imxpbmtfc291cmNlIiwidmFsdWUiOiJkZWZhdWx0IiwiZG9uZSI6dHJ1ZX1dfQ==
Environment
- App version: e.g Proxyman 4.15.0
- macOS version: macOS Monterey
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.