question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable follow redirect

See original GitHub issue

Quote from standard:

A request has an associated redirect mode, which is one of "follow", "error", and "manual". Unless stated otherwise, it is "follow".

A request has an associated redirect count. Unless stated otherwise, it is zero.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
dgrahamcommented, Dec 31, 2015

This is a nice addition to the Fetch API, but we won’t be able to polyfill it with XMLHttpRequest. The browser navigates all redirects before returning a result, so there is no opportunity to interrupt the redirect flow.

If the response has an HTTP status code of 301, 302, 303, 307, or 308…Set the request URL to the URL conveyed by the Location header…transparently follow the redirect…

XMLHttpRequest specification

2reactions
saschanazcommented, Dec 30, 2015

@dgraham Hi, can you reopen this issue?

https://www.chromestatus.com/features/4614142321229824

https://fetch.spec.whatwg.org/#requestredirect

JS use:

fetch(new Request(url, {redirect: 'manual'}))
Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache HttpClient – Do Not Follow Redirects
Stop the Apache HttpClient automatically following redirects - A Day will come when redirects will be followed, but it's not THIS DAY!
Read more >
Can we disable redirects selectively (On specific requests) ...
No, it's not currently (as of gatling 3.4) possible, neither one way (disable globally and re-enable locally) or the other (enable globally ...
Read more >
How Do I Turn Off a Redirection to Another Website?
1. Click on the Windows "Start" button. · 2. Click "Control Panel." Several new icons appear on your screen. · 3. Click "Network...
Read more >
Gatling disableFollowRedirect without KO - Max Chadwick
You can instruct Gatling to not follow the redirect by calling disableFollowRedirect: http("My ... Gatling disableFollowRedirect without KO.
Read more >
How to Block Redirects in Chrome, Firefox, Edge, Safari ...
To disable pop-ups and redirects in Safari, follow this guide: Run Safari;; Click “Safari” on the tab bar (between “Apple” logo and “File”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found