chore: add showInterceptorWarningForDigestAuth field under platformFeatureFlags

Introduce a new platform-level feature flag indicating whether to display a warning via the inspector regarding supported interceptor alongside Digest Auth.
This commit is contained in:
jamesgeorge007 2024-10-30 18:28:13 +05:30
parent 8ac934599a
commit c3518cf678
4 changed files with 8 additions and 3 deletions

View File

@ -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?: LimitsPlatformDef
infra?: InfraPlatformDef

View File

@ -14,4 +14,5 @@ export type PlatformInterceptorDef =
export type InterceptorsPlatformDef = {
default: string
interceptors: PlatformInterceptorDef[]
showInterceptorWarningForDigestAuth?: boolean
}

View File

@ -75,10 +75,8 @@ export class AuthorizationInspectorService
const results: InspectorResult[] = []
// `Agent` interceptor is recommended while using Digest Auth
// TODO: Better check to detect the platform
// Interceptor check only applies to the browser platform
const isUnsupportedInterceptor =
platform.interceptors.default === "browser" &&
platform.platformFeatureFlags.showInterceptorWarningForDigestAuth &&
this.interceptorService.currentInterceptorID.value !==
this.agentService.interceptorID

View File

@ -42,6 +42,7 @@ createHoppApp("#app", {
platformFeatureFlags: {
exportAsGIST: false,
hasTelemetry: false,
showInterceptorWarningForDigestAuth: true,
},
limits: {
collectionImportSizeLimit: 50,