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
|
* Whether to show the A/B testing workspace switcher click login flow or not
|
||||||
*/
|
*/
|
||||||
workspaceSwitcherLogin?: Ref<boolean>
|
workspaceSwitcherLogin?: Ref<boolean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to show the warning about supported interceptors while using the Digest Authorization type
|
||||||
|
*/
|
||||||
|
showInterceptorWarningForDigestAuth?: boolean
|
||||||
}
|
}
|
||||||
limits?: LimitsPlatformDef
|
limits?: LimitsPlatformDef
|
||||||
infra?: InfraPlatformDef
|
infra?: InfraPlatformDef
|
||||||
|
@ -14,4 +14,5 @@ export type PlatformInterceptorDef =
|
|||||||
export type InterceptorsPlatformDef = {
|
export type InterceptorsPlatformDef = {
|
||||||
default: string
|
default: string
|
||||||
interceptors: PlatformInterceptorDef[]
|
interceptors: PlatformInterceptorDef[]
|
||||||
|
showInterceptorWarningForDigestAuth?: boolean
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,8 @@ export class AuthorizationInspectorService
|
|||||||
const results: InspectorResult[] = []
|
const results: InspectorResult[] = []
|
||||||
|
|
||||||
// `Agent` interceptor is recommended while using Digest Auth
|
// `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 =
|
const isUnsupportedInterceptor =
|
||||||
platform.interceptors.default === "browser" &&
|
platform.platformFeatureFlags.showInterceptorWarningForDigestAuth &&
|
||||||
this.interceptorService.currentInterceptorID.value !==
|
this.interceptorService.currentInterceptorID.value !==
|
||||||
this.agentService.interceptorID
|
this.agentService.interceptorID
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ createHoppApp("#app", {
|
|||||||
platformFeatureFlags: {
|
platformFeatureFlags: {
|
||||||
exportAsGIST: false,
|
exportAsGIST: false,
|
||||||
hasTelemetry: false,
|
hasTelemetry: false,
|
||||||
|
showInterceptorWarningForDigestAuth: true,
|
||||||
},
|
},
|
||||||
limits: {
|
limits: {
|
||||||
collectionImportSizeLimit: 50,
|
collectionImportSizeLimit: 50,
|
||||||
|
Loading…
Reference in New Issue
Block a user