Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't silently ignore referrer #1036

Closed
HerrSpace opened this issue Dec 9, 2020 · 0 comments · Fixed by #1057
Closed

Don't silently ignore referrer #1036

HerrSpace opened this issue Dec 9, 2020 · 0 comments · Fixed by #1057
Labels

Comments

@HerrSpace
Copy link

As described in the Readme of the node-fetch repo 'referrer' is currently not implemented. The user is also not warned about its usage either though.

Reproduction

Steps to reproduce the behavior:

Run this in node:

const fetch = require('node-fetch');
var HttpProxyAgent = require('http-proxy-agent');

let url = "http://127.0.0.1"
let promise = fetch(url, {
  agent: new HttpProxyAgent('http://127.0.0.1:8080'),
  method: "GET", // POST, PUT, DELETE, etc.
  referrer: url,
});
promise
    .then(data => data.text())
    .then(text => console.log(text))

Expected behavior

  1. Preferably set the Referer in the HTTP request
  2. Alternatively emit a warning that 'referrer' was ignored.

Screenshots

Request in burp, missing Referer:

Screenshot 2020-12-09 at 17 40 06

Your Environment

software version
http-proxy-agent 4.0.1
node-fetch 2.6.1
node v14.6.0
npm 6.14.7
@HerrSpace HerrSpace added the bug label Dec 9, 2020
@tekwiz tekwiz linked a pull request Jan 3, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant