mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #3557] [feature]: Support proxyscotch token on the interceptor menu #1220
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#1220
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 @deeeeeelan on GitHub (Nov 16, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3557
Is there an existing issue for this?
Summary
As of now currently I cannot find any options on the Web UI of Hoppscotch either self-hosted one or Hoppscotch Cloud to input proxyscotch token for authorization, been getting errors.
I have been looking around the docs , Discussions and Issues and I can't find any. Will be glad if you guys can implement it. Really love how can i use hoppscotch for API testing purpose rather than postman.
Why should this be worked on?
In terms of security concerns I don't think its good to leave a service unauthorised by any means. So having proxy interceptor with optional token input would be great though. It rather depends on the user they want to include the token or not.
@prathamesh-gharat commented on GitHub (Feb 28, 2025):
I tried supplying
VITE_PROXYSCOTCH_ACCESS_TOKENvia .env and it did not work as expected, i.e. theaccessTokenin POST request payload was empty.Using hoppscotch aio to self-host.
https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build
I understand from another issue that the token was removed from the backend intentionally, but there if the accessToken is still going to be visible in the network log of the person making the request then it doesn't make sense to hide the option from the backend settings and move it to env. Or am I missing something? 🤔
There could be several other ways to expose the token in the current setup. In my opinion, it is best not to take up the responsibility for securing the proxy token at hoppscotch's side, that responsibility can belong to the proxy server or some MITM proxy side (Cloudflare Access). However, in case of MITM auth proxy, the handover to authentication redirect needs to be handled at hoppscotch side.
References:
https://github.com/hoppscotch/proxyscotch/issues/80
@aow-asc commented on GitHub (Apr 1, 2025):
Hi,
any news on this topic? Did I understand correctly that it is currently not possible to pass the token to the proxy? Neither via the settings page nor via the .env file?
Thanks
@emil-johansson-99 commented on GitHub (Apr 4, 2025):
Hi!
I have also been confused around proxy access token and environment variable VITE_PROXYSCOTCH_ACCESS_TOKEN. In POST request to proxy the accessToken attribute in payload is always empty string, even if VITE_PROXYSCOTCH_ACCESS_TOKEN is set (as prathamesh-gharat says). At least when running as docker container, if run locally with pnpm it works as expected. Reasons seems to be those to code lines:
Result is that VITE_PROXYSCOTCH_ACCESS_TOKEN is never read since it does not begin with "VITE_BUILDTIME_".
But I am quite new to Hoppscotch and might have misunderstood. And what I don't understand at all is the other environment variables that starts with VITE_, do they work as expected?
Best Regards
Emil Johansson
@emil-johansson-99 commented on GitHub (Apr 15, 2025):
Hi again!
After checking the inner workings of Vite and environment variables I found a fix: add VITE_PROXYSCOTCH_ACCESS_TOKEN to .env.example. It can have any dummy value or just empty string as long it exists. Do you want me to create a PR?
Best Regards
Emil Johansson
@Leon-Luu commented on GitHub (Apr 23, 2025):
Hello, I had done a pull request to fix this issue.
Solution:
VITE_PROXYSCOTCH_ACCESS_TOKEN must be available on the .env.example file due to this line on vite.config.ts
https://github.com/hoppscotch/hoppscotch/pull/5015
@liyasthomas please confirm
@finnmglas commented on GitHub (Jun 29, 2025):
this is still an issue