mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #2791] [MERGED] feat: use environment variable to specify proxyscotch access token #4067
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#4067
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?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/2791
Author: @biondizzle
Created: 10/16/2022
Status: ✅ Merged
Merged: 10/29/2022
Merged by: @AndrewBastin
Base:
main← Head:#2203_specify_access_token_for_self_hosted_proxyscotch📝 Commits (4)
d58fae7#2203 - Use environment variable to specify proxyscotch access tokendb18becMerge branch 'main' into #2203_specify_access_token_for_self_hosted_proxyscotch0339f77use Nullish Coalescing59d58ccMerge branch 'main' into #2203_specify_access_token_for_self_hosted_proxyscotch📊 Changes
3 files changed (+6 additions, -0 deletions)
View changed files
📝
packages/hoppscotch-app/.env.example(+3 -0)📝
packages/hoppscotch-app/src/helpers/strategies/AxiosStrategy.ts(+1 -0)📝
packages/hoppscotch-app/src/vite-envs.d.ts(+2 -0)📄 Description
Closes #2203
Description
Currently no way of specifying the access token to a self-hosted version of Proxyscotch. This adds an optional environment variable to do so.
This will pass
accessTokento the Proxy where it will get filled into this struct:github.com/hoppscotch/proxyscotch@2e94def1c2/libproxy/proxy.go (L30)Which will get set when the request body is decoded in these two spots:
github.com/hoppscotch/proxyscotch@2e94def1c2/libproxy/proxy.go (L197)github.com/hoppscotch/proxyscotch@2e94def1c2/libproxy/proxy.go (L206)And then be validated here:
github.com/hoppscotch/proxyscotch@2e94def1c2/libproxy/proxy.go (L216)Checks
Additional Information
I don't know typescript so not sure if I needed to add
accessTokentogithub.com/hoppscotch/hoppscotch@6e7d28db7b/packages/hoppscotch-app/src/helpers/strategies/AxiosStrategy.ts (L16)Also, not sure if the environment variable needs to be added to any of the workflows YAMLs but decided not to add it since clearly the current prod version of this has been working fine without the need for this environment variable. Assuming that's because https://proxy.hoppscotch.io/ is secured via incoming source restriction.
Just let me know what you want changed and I'll do it real quick, or feel free to modify it to your heart's content.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.