GuardPluginOptions
Defined in: packages/fastify/src/plugin.ts:38
Properties
Section titled “Properties”agentHandler?
Section titled “agentHandler?”
optionalagentHandler?:AgentHandlerProtocol
Defined in: packages/fastify/src/plugin.ts:40
config
Section titled “config”config:
object
Defined in: packages/fastify/src/plugin.ts:39
agentApiKey?
Section titled “agentApiKey?”
optionalagentApiKey?:string|null
agentBackoffFactor?
Section titled “agentBackoffFactor?”
optionalagentBackoffFactor?:number|null
agentBufferOverflowPolicy?
Section titled “agentBufferOverflowPolicy?”
optionalagentBufferOverflowPolicy?:"drop"|"block"|"raise"|null
agentBufferSize?
Section titled “agentBufferSize?”
optionalagentBufferSize?:number
agentCompressionEnabled?
Section titled “agentCompressionEnabled?”
optionalagentCompressionEnabled?:boolean|null
agentCompressionThreshold?
Section titled “agentCompressionThreshold?”
optionalagentCompressionThreshold?:number|null
agentEnableEvents?
Section titled “agentEnableEvents?”
optionalagentEnableEvents?:boolean
agentEnableMetrics?
Section titled “agentEnableMetrics?”
optionalagentEnableMetrics?:boolean
agentEndpoint?
Section titled “agentEndpoint?”
optionalagentEndpoint?:string
agentFlushInterval?
Section titled “agentFlushInterval?”
optionalagentFlushInterval?:number
agentGuardVersion?
Section titled “agentGuardVersion?”
optionalagentGuardVersion?:string|null
agentHighWatermarkRatio?
Section titled “agentHighWatermarkRatio?”
optionalagentHighWatermarkRatio?:number|null
agentInstallId?
Section titled “agentInstallId?”
optionalagentInstallId?:string|null
agentMaxConcurrentFlushes?
Section titled “agentMaxConcurrentFlushes?”
optionalagentMaxConcurrentFlushes?:number|null
agentMaxPayloadSize?
Section titled “agentMaxPayloadSize?”
optionalagentMaxPayloadSize?:number|null
agentPayloadSigningSecret?
Section titled “agentPayloadSigningSecret?”
optionalagentPayloadSigningSecret?:string|null
agentProjectEncryptionKey?
Section titled “agentProjectEncryptionKey?”
optionalagentProjectEncryptionKey?:string|null
agentProjectId?
Section titled “agentProjectId?”
optionalagentProjectId?:string|null
agentRetryAttempts?
Section titled “agentRetryAttempts?”
optionalagentRetryAttempts?:number
agentSensitiveHeaders?
Section titled “agentSensitiveHeaders?”
optionalagentSensitiveHeaders?:string[] |null
agentStatusInterval?
Section titled “agentStatusInterval?”
optionalagentStatusInterval?:number
agentStrict?
Section titled “agentStrict?”
optionalagentStrict?:boolean
agentTimeout?
Section titled “agentTimeout?”
optionalagentTimeout?:number
authVerifier?
Section titled “authVerifier?”
optionalauthVerifier?: (request,credential) =>unknown
Parameters
Section titled “Parameters”request
Section titled “request”credential
Section titled “credential”string
Returns
Section titled “Returns”unknown
autoBanDuration?
Section titled “autoBanDuration?”
optionalautoBanDuration?:number
autoBanThreshold?
Section titled “autoBanThreshold?”
optionalautoBanThreshold?:number
behaviorMaxResponseBodyInspectBytes?
Section titled “behaviorMaxResponseBodyInspectBytes?”
optionalbehaviorMaxResponseBodyInspectBytes?:number
behaviorScanResponseBody?
Section titled “behaviorScanResponseBody?”
optionalbehaviorScanResponseBody?:boolean
blacklist?
Section titled “blacklist?”
optionalblacklist?:string[]
blockCloudProviders?
Section titled “blockCloudProviders?”
optionalblockCloudProviders?: ("AWS"|"GCP"|"Azure")[]
blockedCountries?
Section titled “blockedCountries?”
optionalblockedCountries?:string[]
blockedUserAgents?
Section titled “blockedUserAgents?”
optionalblockedUserAgents?:string[]
bodyReadMaxConcurrent?
Section titled “bodyReadMaxConcurrent?”
optionalbodyReadMaxConcurrent?:number
bodyReadTimeout?
Section titled “bodyReadTimeout?”
optionalbodyReadTimeout?:number
cloudIpRefreshInterval?
Section titled “cloudIpRefreshInterval?”
optionalcloudIpRefreshInterval?:number
corsAllowCredentials?
Section titled “corsAllowCredentials?”
optionalcorsAllowCredentials?:boolean
corsAllowHeaders?
Section titled “corsAllowHeaders?”
optionalcorsAllowHeaders?:string[]
corsAllowMethods?
Section titled “corsAllowMethods?”
optionalcorsAllowMethods?:string[]
corsAllowOrigins?
Section titled “corsAllowOrigins?”
optionalcorsAllowOrigins?:string[]
corsExposeHeaders?
Section titled “corsExposeHeaders?”
optionalcorsExposeHeaders?:string[]
corsMaxAge?
Section titled “corsMaxAge?”
optionalcorsMaxAge?:number
customErrorResponses?
Section titled “customErrorResponses?”
optionalcustomErrorResponses?:Record<PropertyKey,string>
customLogFile?
Section titled “customLogFile?”
optionalcustomLogFile?:string|null
customRequestCheck?
Section titled “customRequestCheck?”
optionalcustomRequestCheck?: (req) =>Promise<GuardResponse|null>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<GuardResponse | null>
customResponseModifier?
Section titled “customResponseModifier?”
optionalcustomResponseModifier?: (res) =>Promise<GuardResponse>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<GuardResponse>
detectionAnomalyEmissionCooldown?
Section titled “detectionAnomalyEmissionCooldown?”
optionaldetectionAnomalyEmissionCooldown?:number
detectionAnomalyThreshold?
Section titled “detectionAnomalyThreshold?”
optionaldetectionAnomalyThreshold?:number
detectionBinaryMinRunLength?
Section titled “detectionBinaryMinRunLength?”
optionaldetectionBinaryMinRunLength?:number
detectionCompilerTimeout?
Section titled “detectionCompilerTimeout?”
optionaldetectionCompilerTimeout?:number
detectionMaxBodyInspectBytes?
Section titled “detectionMaxBodyInspectBytes?”
optionaldetectionMaxBodyInspectBytes?:number
detectionMaxContentLength?
Section titled “detectionMaxContentLength?”
optionaldetectionMaxContentLength?:number
detectionMaxJsonDepth?
Section titled “detectionMaxJsonDepth?”
optionaldetectionMaxJsonDepth?:number
detectionMaxScanChars?
Section titled “detectionMaxScanChars?”
optionaldetectionMaxScanChars?:number
detectionMaxScanValues?
Section titled “detectionMaxScanValues?”
optionaldetectionMaxScanValues?:number
detectionMaxTrackedPatterns?
Section titled “detectionMaxTrackedPatterns?”
optionaldetectionMaxTrackedPatterns?:number
detectionMinSamplesForAnomaly?
Section titled “detectionMinSamplesForAnomaly?”
optionaldetectionMinSamplesForAnomaly?:number
detectionMonitorHistorySize?
Section titled “detectionMonitorHistorySize?”
optionaldetectionMonitorHistorySize?:number
detectionPatternValidationCachePath?
Section titled “detectionPatternValidationCachePath?”
optionaldetectionPatternValidationCachePath?:string|null
detectionPreserveAttackPatterns?
Section titled “detectionPreserveAttackPatterns?”
optionaldetectionPreserveAttackPatterns?:boolean
detectionScanBody?
Section titled “detectionScanBody?”
optionaldetectionScanBody?:boolean
detectionScanWorkerPool?
Section titled “detectionScanWorkerPool?”
optionaldetectionScanWorkerPool?:boolean
detectionSemanticThreshold?
Section titled “detectionSemanticThreshold?”
optionaldetectionSemanticThreshold?:number
detectionSlowPatternThreshold?
Section titled “detectionSlowPatternThreshold?”
optionaldetectionSlowPatternThreshold?:number
detectionThreatScoreThreshold?
Section titled “detectionThreatScoreThreshold?”
optionaldetectionThreatScoreThreshold?:number
dynamicRuleInterval?
Section titled “dynamicRuleInterval?”
optionaldynamicRuleInterval?:number
dynamicRulesCachePath?
Section titled “dynamicRulesCachePath?”
optionaldynamicRulesCachePath?:string|null
emergencyMode?
Section titled “emergencyMode?”
optionalemergencyMode?:boolean
emergencyWhitelist?
Section titled “emergencyWhitelist?”
optionalemergencyWhitelist?:string[]
enableAgent?
Section titled “enableAgent?”
optionalenableAgent?:boolean
enableCors?
Section titled “enableCors?”
optionalenableCors?:boolean
enabledDetectionCategories?
Section titled “enabledDetectionCategories?”
optionalenabledDetectionCategories?:string[]
enableDynamicRules?
Section titled “enableDynamicRules?”
optionalenableDynamicRules?:boolean
enableEnrichment?
Section titled “enableEnrichment?”
optionalenableEnrichment?:boolean
enableIpBanning?
Section titled “enableIpBanning?”
optionalenableIpBanning?:boolean
enableLogfire?
Section titled “enableLogfire?”
optionalenableLogfire?:boolean
enableOtel?
Section titled “enableOtel?”
optionalenableOtel?:boolean
enablePenetrationDetection?
Section titled “enablePenetrationDetection?”
optionalenablePenetrationDetection?:boolean
enableRateLimitAutoBan?
Section titled “enableRateLimitAutoBan?”
optionalenableRateLimitAutoBan?:boolean
enableRateLimiting?
Section titled “enableRateLimiting?”
optionalenableRateLimiting?:boolean
enableRedis?
Section titled “enableRedis?”
optionalenableRedis?:boolean
endpointRateLimits?
Section titled “endpointRateLimits?”
optionalendpointRateLimits?:Record<string, [number,number]>
enforceHttps?
Section titled “enforceHttps?”
optionalenforceHttps?:boolean
excludedDetectionBodyFields?
Section titled “excludedDetectionBodyFields?”
optionalexcludedDetectionBodyFields?:string[]
excludedDetectionHeaders?
Section titled “excludedDetectionHeaders?”
optionalexcludedDetectionHeaders?:string[]
excludedDetectionParams?
Section titled “excludedDetectionParams?”
optionalexcludedDetectionParams?:string[]
excludePaths?
Section titled “excludePaths?”
optionalexcludePaths?:string[]
exemptIps?
Section titled “exemptIps?”
optionalexemptIps?:string[]
failSecure?
Section titled “failSecure?”
optionalfailSecure?:boolean
geoIpDbMaxAge?
Section titled “geoIpDbMaxAge?”
optionalgeoIpDbMaxAge?:number
geoIpHandler?
Section titled “geoIpHandler?”
optionalgeoIpHandler?:GeoIPHandler
geoResolver?
Section titled “geoResolver?”
optionalgeoResolver?: (ip) =>string|null
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | null
globalBehaviorRules?
Section titled “globalBehaviorRules?”
optionalglobalBehaviorRules?:object[]
ipinfoDbPath?
Section titled “ipinfoDbPath?”
optionalipinfoDbPath?:string
ipinfoToken?
Section titled “ipinfoToken?”
optionalipinfoToken?:string|null
lazyInit?
Section titled “lazyInit?”
optionallazyInit?:boolean
logCountryCheckLevel?
Section titled “logCountryCheckLevel?”
optionallogCountryCheckLevel?:"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
logfireServiceName?
Section titled “logfireServiceName?”
optionallogfireServiceName?:string
logFormat?
Section titled “logFormat?”
optionallogFormat?:"text"|"json"
logger?
Section titled “logger?”
optionallogger?:Logger
logRequestLevel?
Section titled “logRequestLevel?”
optionallogRequestLevel?:"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
logSensitiveBodyFields?
Section titled “logSensitiveBodyFields?”
optionallogSensitiveBodyFields?:string[]
logSensitiveHeaders?
Section titled “logSensitiveHeaders?”
optionallogSensitiveHeaders?:string[]
logSensitiveParams?
Section titled “logSensitiveParams?”
optionallogSensitiveParams?:string[]
logSuspiciousLevel?
Section titled “logSuspiciousLevel?”
optionallogSuspiciousLevel?:"INFO"|"DEBUG"|"WARNING"|"ERROR"|"CRITICAL"|null
mutedCheckLogs?
Section titled “mutedCheckLogs?”
optionalmutedCheckLogs?:string[]
mutedEventTypes?
Section titled “mutedEventTypes?”
optionalmutedEventTypes?:string[]
mutedMetricTypes?
Section titled “mutedMetricTypes?”
optionalmutedMetricTypes?:string[]
onBlock?
Section titled “onBlock?”
optionalonBlock?: (request,payload) =>unknown
Parameters
Section titled “Parameters”request
Section titled “request”payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”unknown
onError?
Section titled “onError?”
optionalonError?: (stage,error,context) =>void
Parameters
Section titled “Parameters”string
unknown
context
Section titled “context”Record<string, unknown>
Returns
Section titled “Returns”void
otelExporterEndpoint?
Section titled “otelExporterEndpoint?”
optionalotelExporterEndpoint?:string|null
otelResourceAttributes?
Section titled “otelResourceAttributes?”
optionalotelResourceAttributes?:Record<string,string>
otelServiceName?
Section titled “otelServiceName?”
optionalotelServiceName?:string
passiveMode?
Section titled “passiveMode?”
optionalpassiveMode?:boolean
rateLimit?
Section titled “rateLimit?”
optionalrateLimit?:number
rateLimitWindow?
Section titled “rateLimitWindow?”
optionalrateLimitWindow?:number
redisFailOpen?
Section titled “redisFailOpen?”
optionalredisFailOpen?:boolean
redisHealthCheckInterval?
Section titled “redisHealthCheckInterval?”
optionalredisHealthCheckInterval?:number
redisMaxConnections?
Section titled “redisMaxConnections?”
optionalredisMaxConnections?:number|null
redisPrefix?
Section titled “redisPrefix?”
optionalredisPrefix?:string
redisRetries?
Section titled “redisRetries?”
optionalredisRetries?:number
redisSocketConnectTimeout?
Section titled “redisSocketConnectTimeout?”
optionalredisSocketConnectTimeout?:number|null
redisSocketTimeout?
Section titled “redisSocketTimeout?”
optionalredisSocketTimeout?:number|null
redisUrl?
Section titled “redisUrl?”
optionalredisUrl?:string
routeResolutionStrict?
Section titled “routeResolutionStrict?”
optionalrouteResolutionStrict?:boolean
securityHeaders?
Section titled “securityHeaders?”
optionalsecurityHeaders?: {contentTypeOptions?:string;csp?:Record<string,string[]> |null;custom?:Record<string,string> |null;enabled?:boolean;frameOptions?:"DENY"|"SAMEORIGIN";hsts?: {includeSubdomains?:boolean;maxAge?:number;preload?:boolean; };permissionsPolicy?:string;referrerPolicy?:string;xssProtection?:string; } |null
threatBanConfig?
Section titled “threatBanConfig?”
optionalthreatBanConfig?:Record<string, {duration:number;threshold:number; }>
trustedProxies?
Section titled “trustedProxies?”
optionaltrustedProxies?:string[]
trustedProxyDepth?
Section titled “trustedProxyDepth?”
optionaltrustedProxyDepth?:number
trustXForwardedProto?
Section titled “trustXForwardedProto?”
optionaltrustXForwardedProto?:boolean
whitelist?
Section titled “whitelist?”
optionalwhitelist?:string[] |null
whitelistCountries?
Section titled “whitelistCountries?”
optionalwhitelistCountries?:string[]
geoIpHandler?
Section titled “geoIpHandler?”
optionalgeoIpHandler?:GeoIPHandler
Defined in: packages/fastify/src/plugin.ts:41
guardDecorator?
Section titled “guardDecorator?”
optionalguardDecorator?:unknown
Defined in: packages/fastify/src/plugin.ts:42
routeConfigs?
Section titled “routeConfigs?”
optionalrouteConfigs?:PathRouteConfigEntry[]
Defined in: packages/fastify/src/plugin.ts:47