Skip to content

POST request non proxyed #42

@giulianoz

Description

@giulianoz

Hi,
it seems that POST requests are not proxyed correctly as I see no requests arriving on destination server. The same request works fine from chrome/postman to the destination proxy. Also get requests works fine

BTW I've added this to handle the form data:
var body=req.body;
if (body) {
opts.form=body
}
before

var myReq = request(opts, function (myRes) {

my opts variable contains the following:
{ protocol: 'http:',
slashes: true,
auth: null,
host: '127.0.0.1:4000',
port: '4000',
hostname: '127.0.0.1',
hash: null,
search: null,
query: null,
pathname: '/admin',
path: '/admin/test',
href: 'http://127.0.0.1:4000/admin',
method: 'POST',
headers:
{ connection: 'keep-alive',
'content-length': '263',
'cache-control': 'no-cache',
origin: 'chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.78 Safari/537.36',
'content-type': 'application/x-www-form-urlencoded',
accept: '/',
'accept-encoding': 'gzip, deflate',
'accept-language': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4',
cookie: ...' },
form:
{ key1: 'value1' } }

do you have any idea about that ?

thanks

giuliano

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions