Search code examples
flutterhttp-headersflutter-webchopper

Flutter Web - Can't change GET request's referer in header


I'm trying to call a GET request using chopper with a custom referer. But everytime it calls, it only uses the default referer. I added a custom header and it still works

Set up request with custom header with custom referer

The referer does not change


Solution

  • You can not change referrer programmatically. please refer this web page : https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name

    A forbidden header name is the name of any HTTP header that cannot be modified programmatically; specifically,