feat: use environment variable to specify proxyscotch access token (#2791)
This commit is contained in:
@@ -26,3 +26,6 @@ VITE_BACKEND_WS_URL=wss://api.hoppscotch.io/graphql
|
||||
# VITE_SENTRY_DSN: <Sentry DSN here>
|
||||
# VITE_SENTRY_ENVIRONMENT: <Sentry environment value here>
|
||||
# VITE_SENTRY_RELEASE_TAG: <Sentry release tag here (for release monitoring)>
|
||||
|
||||
# Proxyscotch Access Token (Optional)
|
||||
# VITE_PROXYSCOTCH_ACCESS_TOKEN: <Token Set In Proxyscotch Server>
|
||||
|
||||
@@ -29,6 +29,7 @@ const getProxyPayload = (
|
||||
let payload: ProxyPayloadType = {
|
||||
...req,
|
||||
wantsBinary: true,
|
||||
accessToken: import.meta.env.VITE_PROXYSCOTCH_ACCESS_TOKEN ?? "",
|
||||
}
|
||||
|
||||
if (payload.data instanceof FormData) {
|
||||
|
||||
2
packages/hoppscotch-app/src/vite-envs.d.ts
vendored
2
packages/hoppscotch-app/src/vite-envs.d.ts
vendored
@@ -24,6 +24,8 @@ interface ImportMetaEnv {
|
||||
readonly VITE_SENTRY_DSN?: string
|
||||
readonly VITE_SENTRY_ENVIRONMENT?: string
|
||||
readonly VITE_SENTRY_RELEASE_TAG?: string
|
||||
|
||||
readonly VITE_PROXYSCOTCH_ACCESS_TOKEN?: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
|
||||
Reference in New Issue
Block a user