mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-21 22:50:51 +00:00
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:
parent
8ac934599a
commit
c3518cf678
@ -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
|
||||
|
@ -14,4 +14,5 @@ export type PlatformInterceptorDef =
|
||||
export type InterceptorsPlatformDef = {
|
||||
default: string
|
||||
interceptors: PlatformInterceptorDef[]
|
||||
showInterceptorWarningForDigestAuth?: boolean
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -42,6 +42,7 @@ createHoppApp("#app", {
|
||||
platformFeatureFlags: {
|
||||
exportAsGIST: false,
|
||||
hasTelemetry: false,
|
||||
showInterceptorWarningForDigestAuth: true,
|
||||
},
|
||||
limits: {
|
||||
collectionImportSizeLimit: 50,
|
||||
|
Loading…
Reference in New Issue
Block a user