mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #2095] [feature]: Disable redirects #699
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#699
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KaKi87 on GitHub (Jan 28, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2095
Originally assigned to: @CuriousCorrelation on GitHub.
Is there an existing issue for this?
Summary
Disable redirects
Why should this be worked on?
Disable redirects
@iamajar commented on GitHub (Jun 28, 2022):
I need the feature too.
Just like the setting of Postman - "Automatically follow redirects : off".
@ghost commented on GitHub (Jul 10, 2022):
I need the feature too.
Sometimes we just need to see
302 Found@AndrewBastin commented on GitHub (Jul 13, 2022):
That is exactly the problem, since we are backed by the browser APIs at the end of the day, due to the Atomic HTTP Redirect Handling policy in the
fetchimplementation, we will not be able to get access to the redirect information. If we ask the browser to disable redirect, it will just send us out a generic network error where we can't guarantee whether it was a connectivity issue, invalid content or even a redirect.See spec: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling
This may be possible to be implemented in Proxyscotch tho.
I am keeping this issue open so we can eventually implement it when we are building the native app.
@KaKi87 commented on GitHub (Jul 13, 2022):
Exactly, please.
By native, do you mean non-Electron ?
@AndrewBastin commented on GitHub (Jul 13, 2022):
Please create an issue in github.com/hoppscotch/proxyscotch so that can be tracked.
Absolutely not, we are planning to go with Tauri, but this is still long ways off, I don't expect it to even be in an Alpha stage till 2023.
@KaKi87 commented on GitHub (Jul 14, 2022):
Oh I'm sorry, I thought that was the extension.
Could the extension handle this ?
Nice !
What would take that long ?
Tauri's HTTP methods are easy enough to use so that I made an
axiosadapter for it.Would you like a
fetchadapter ?@AndrewBastin commented on GitHub (Jul 14, 2022):
AFAIK, I don't think so. Extension still uses the browser APIs for the most part.
Thank you for your suggestion (your code looks awesome! ❤️).
We are still a small team and we want to keep the web app as the main priority still. We believe the web app is the future for the most part and native is just a way to keep the app not limited due to browser issues meanwhile. We want to spend a lot of time, just figuring out how to make the development part really easy in a way that we can just build the web app and the native app together at the same time in a way that it is really clean because we think it is a worthwhile investment. So, I am working towards that for now.
You can DM me if you are interested in continuing the conversation as it is getting a bit off-topic. You can find me on the Hoppscotch Discord/Telegram (link in README).
@drilus commented on GitHub (Oct 6, 2023):
I need this feature as well.
@Daanoz commented on GitHub (Nov 10, 2023):
As an alternative, would it be possible to expose the url where the request redirected to, in the
pw.responseobject so it could be used in the scripts? https://docs.hoppscotch.io/documentation/features/scripts#pwresponse@KaKi87 commented on GitHub (Nov 10, 2023):
That's not an alternative because it wouldn't provide access to everything else the redirecting server returns (code, headers, even body), nor handle multiple redirections.
@Daanoz commented on GitHub (Nov 10, 2023):
True, it's not a full solution, but it might be something that can be more easily realized on a shorter timeframe.
In my usecase, I have an oAuth service with PKCE flow which I'm trying to validate. The oAuth spec defines one of the requests has to be a redirect, which includes a code token as parameter in the url. With the current client, there is simply no way to access that code value, not via the UI and not via scripting.
@adilek commented on GitHub (Dec 13, 2023):
This feature is important for me and my team as well.
@bttger commented on GitHub (Jan 1, 2024):
Why not simply add the
redirect: "error"prop if users ask to disable redirects? I don't care about the location and status code. If really necessary I could just use another tool (e.g. httpie where redirects are always disabled). The fetch request would then just returnTypeError: Failed to fetch. And either the user decides whether this has happened due to a redirect (since he/she disabled them intentionally) or hoppscotch does another request to test if the failure was due to the redirect (theresponse.redirectedprop will betrue). The latter would probably be preferred.Here's how i tested it based on the MDN fetch redirect docs:
@KaKi87 commented on GitHub (Jan 1, 2024):
I do.
@bttger commented on GitHub (Jan 2, 2024):
Then use another tool - it's not possible to get that info in a browser. But I showed a way how to disable redirects and to at least tell whether a redirect was responsible for the failure (if a request failed). I believe this would already help a lot.
@KaKi87 commented on GitHub (Jan 2, 2024):
That's what the proxy and the desktop app are for.
@bttger commented on GitHub (Jan 3, 2024):
The proxy is a browser extension with the same limitation and the desktop app doesn't provide that feature either. What point do you want to make?
@KaKi87 commented on GitHub (Jan 4, 2024):
No, the proxy is the proxy, and the browser extension is the browser extension.
Therefore, since not running in browser, the proxy could disable redirects.
Yes it does provide that feature, so it could disable redirects as well.
@bttger commented on GitHub (Jan 4, 2024):
Sorry, I didn't know there was an additional proxy. Had a quick look into it but personally I have no use case to use the proxy so I'd like to avoid the hassle (especially when working with WSL/docker and thinking that the USP of Hoppsotch is that I can just open the tool quickly on my work laptop without installing anything).
And yes, of course does Tauri support disabling of redirects but I was talking about the desktop app - it doesn't provide the disabling of redirects. And I still believe that my proposal would be a nice improvement over the current situation that would be easy to implement. Yes, it wouldn't show the status code but it would tell you that the request has failed due to a redirect.
@yannleretaille commented on GitHub (Nov 14, 2024):
Since the desktop app is using tauri now, shouldn't it be possible to add per-request option that sets curl::Easy::max_redirections to
0in the native interceptor/relay?I just hit the same issue testing an auth endpoint earlier, where I just needed to see the redirect status code, location headers etc. to confirm that it's working as intended and instead got a "Could not send request" error.
@macmessa commented on GitHub (Aug 26, 2025):
Is this in the backlog?
@carlos-dubon commented on GitHub (Oct 11, 2025):
i have the opposite problem. i want to enable them, but i cant find the toggle
@KaKi87 commented on GitHub (Oct 12, 2025):
The reason why this issue is a feature request for disabling redirects is that redirects are enabled by default and cannot be disabled.
@carlos-dubon commented on GitHub (Oct 12, 2025):
Yeah I'm not trying to be odd or something. It's just that mine isn't redirecting. Maybe I'll open another issue
@KaKi87 commented on GitHub (Oct 12, 2025):
Okay, though that's likely an issue on your API, I'm afraid. I'd suggest getting raw output using cURL, feeding it to an AI, along with the redirect you expected, and asking it why it doesn't.
@jamesgeorge007 commented on GitHub (Oct 31, 2025):
Hi, the ability to disable redirects has been added to the Desktop App and Agent micro application for use in the web app as part of the latest release. Please feel free to share any feedback.