Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: add `showInterceptorWarningForDigestAuth` field under `platformFeatureFlags`
jamesgeorge007c3518cf678c2
diff --git a/packages/hoppscotch-common/src/platform/index.ts b/packages/hoppscotch-common/src/platform/index.tsindex 2550a5a59..9acff14f4 100644--- a/packages/hoppscotch-common/src/platform/index.ts+++ b/packages/hoppscotch-common/src/platform/index.ts@@ -54,6 +54,11 @@ export type PlatformDef = {* Whether to show the A/B testing workspace switcher click login flow or not*/workspaceSwitcherLogin?: Ref<boolean>++ /**+ * Whether to show the warning about supported interceptors while using the Digest Authorization type+ */+ showInterceptorWarningForDigestAuth?: boolean}limits?: LimitsPlatformDefinfra?: InfraPlatformDefdiff --git a/packages/hoppscotch-common/src/platform/interceptors.ts b/packages/hoppscotch-common/src/platform/interceptors.tsindex 6c2cd8324..9197cf722 100644--- a/packages/hoppscotch-common/src/platform/interceptors.ts+++ b/packages/hoppscotch-common/src/platform/interceptors.ts@@ -14,4 +14,5 @@ export type PlatformInterceptorDef =export type InterceptorsPlatformDef = {default: stringinterceptors: PlatformInterceptorDef[]+ showInterceptorWarningForDigestAuth?: boolean}diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.tsindex 4a9818abb..e26f251e2 100644--- a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts+++ b/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts@@ -75,10 +75,8 @@ export class AuthorizationInspectorServiceconst results: InspectorResult[] = []// `Agent` interceptor is recommended while using Digest Auth- // TODO: Better check to detect the platform- // Interceptor check only applies to the browser platformconst isUnsupportedInterceptor =- platform.interceptors.default === "browser" &&+ platform.platformFeatureFlags.showInterceptorWarningForDigestAuth &&this.interceptorService.currentInterceptorID.value !==this.agentService.interceptorIDdiff --git a/packages/hoppscotch-selfhost-web/src/main.ts b/packages/hoppscotch-selfhost-web/src/main.tsindex 3d5839d4e..4482d4163 100644--- a/packages/hoppscotch-selfhost-web/src/main.ts+++ b/packages/hoppscotch-selfhost-web/src/main.ts@@ -42,6 +42,7 @@ createHoppApp("#app", {platformFeatureFlags: {exportAsGIST: false,hasTelemetry: false,+ showInterceptorWarningForDigestAuth: true,},limits: {collectionImportSizeLimit: 50,