Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.
We recommend only using this method in local mode to populate new entries
in the blocklist. In cloud mode, the blocklist is populated automatically.
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"ChainPatrol","colors":{"primary":"#6622DC","light":"#985EFD","dark":"#2A186B"},"logo":{"light":"https://mintcdn.com/chainpatrol/R_CITzEDbsciFTsn/logo/light.svg?fit=max\u0026auto=format\u0026n=R_CITzEDbsciFTsn\u0026q=85\u0026s=8ca4a8411113008ec8f9a57dec249989","dark":"https://mintcdn.com/chainpatrol/R_CITzEDbsciFTsn/logo/dark.svg?fit=max\u0026auto=format\u0026n=R_CITzEDbsciFTsn\u0026q=85\u0026s=3fba0f7cf94681111da5d1ce52ebf33b","href":"https://chainpatrol.com"},"favicon":"https://mintcdn.com/chainpatrol/R_CITzEDbsciFTsn/favicon.svg?fit=max\u0026auto=format\u0026n=R_CITzEDbsciFTsn\u0026q=85\u0026s=2ee94dcfc07708e2929aad42ea5ab4c5","api":{"openapi":"https://app.chainpatrol.io/api/v2/openapi.json?v=2","mdx":{"auth":{"method":"key","name":"X-API-KEY"},"server":"https://app.chainpatrol.io/api/v2"}},"appearance":{"default":"dark"},"background":{"image":"https://mintcdn.com/chainpatrol/oLEHOzLMXL0CWKrg/background.png?fit=max\u0026auto=format\u0026n=oLEHOzLMXL0CWKrg\u0026q=85\u0026s=562d8e2e01dbe50733cb041efde433a6","color":{"dark":"#060114"}},"navbar":{"links":[{"href":"https://chainpatrol.com/blog","label":"Blog"},{"href":"https://chainpatrol.com/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.chainpatrol.io/"}},"footer":{"socials":{"x":"https://x.com/chainpatrol","linkedin":"https://www.linkedin.com/company/89545915","github":"https://github.com/chainpatrol"}},"fonts":{"heading":{"family":"IBM Plex Sans"},"body":{"family":"Inter"}},"integrations":{"ga4":{"measurementId":"G-QEBBHCD92K"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":"getting-started/what-we-do/introduction"},{"language":"es","href":"es/getting-started/what-we-do/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chainpatrol","hasAudioNarration":false,"actualSubdomain":"chainpatrol","customDomains":["chainpatrol.com"],"gitSource":{"type":"github","owner":"chainpatrol","repo":"docs","deployBranch":"main","contentDirectory":"","mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b07da4be817875fa67ee892","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"en","tag":"API Reference","count":107},{"language":"es","tag":"Referencia de la API","count":106},{"language":"en","tag":"Documentation","count":29},{"language":"es","tag":"Documentación","count":29},{"language":"en","tag":"Integrations","count":24},{"language":"es","tag":"Integraciones","count":24},{"language":"en","tag":"JavaScript SDK","count":22},{"language":"es","tag":"SDK de JavaScript","count":22},{"language":"en","tag":"Getting Started","count":21},{"language":"es","tag":"Primeros pasos","count":20},{"language":"en","tag":"CLI","count":16},{"language":"es","tag":"CLI","count":16},{"language":"en","tag":"Concepts","count":14},{"language":"en","tag":"Assets","count":14},{"language":"es","tag":"Conceptos","count":14},{"language":"es","tag":"Assets","count":14},{"language":"en","tag":"Threat Detection","count":13},{"language":"es","tag":"Detección de amenazas","count":13},{"language":"en","tag":"Metrics","count":12},{"language":"es","tag":"Métricas","count":12}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"sdk/threat-detector/instance-methods/block","slug":"/sdk/threat-detector/instance-methods/block","pageMetadata":{"title":"block()","description":"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.","href":"/sdk/threat-detector/instance-methods/block"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsxs(_components.p,{children:[`We recommend only using this method in `,_jsx(_components.code,{children:`local`}),` mode to populate new entries\nin the blocklist. In `,_jsx(_components.code,{children:`cloud`}),` mode, the blocklist is populated automatically.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Code`,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` detector`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`block`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` detector`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://google.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Output`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BLOCKED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:` redirectUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.chainpatrol.io/preview?target=https%3A%2F%2Fgoogle.com\u0026originUrl=https%3A%2F%2Fgoogle.com\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(ParamField,{body:`url`,type:`string`,required:true,id:`param-url`,children:[_jsx(_components.p,{children:`The URL to block. This can be a full URL or a domain.`}),_jsxs(_components.p,{children:[`Ex. `,_jsx(_components.code,{children:`https://google.com`}),` or `,_jsx(_components.code,{children:`google.com`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`return-value`,children:`Return Value`}),`\n`,_jsx(_components.p,{children:`The return value is a promise that resolves with a result object.`}),`\n`,_jsx(Heading,{level:`3`,id:`success`,children:`Success`}),`\n`,_jsx(_components.p,{children:`If the addition was successful, the object will contain the following properties:`}),`\n`,_jsx(ParamField,{body:`result`,type:`object`,required:true,id:`param-result`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsx(ParamField,{body:`ok`,type:`true`,required:true,id:`param-ok`,children:_jsxs(_components.p,{children:[`This property will be `,_jsx(_components.code,{children:`true`}),` if the addition was successful.`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url-1`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`url`}),` property is the URL that was added.`]})})]})}),`\n`,_jsx(Heading,{level:`3`,id:`failure`,children:`Failure`}),`\n`,_jsx(_components.p,{children:`However, if the addition was unsuccessful, the object will contain the following:`}),`\n`,_jsx(ParamField,{body:`result`,type:`object`,required:true,id:`param-result-1`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsx(ParamField,{body:`ok`,type:`false`,required:true,id:`param-ok-1`,children:_jsxs(_components.p,{children:[`This property will be `,_jsx(_components.code,{children:`false`}),` if the addition was unsuccessful.`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url-2`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`url`}),` property is the URL that we tried to add.`]})}),_jsx(ParamField,{body:`error`,type:`string`,id:`param-error`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`error`}),` property will contain a human-readable error message.`]})})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"block()","description":"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.","href":"/sdk/threat-detector/instance-methods/block"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Return Value","slug":"return-value","depth":2,"children":[{"title":"Success","slug":"success","depth":3,"children":[]},{"title":"Failure","slug":"failure","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chainpatrol","siteName":"ChainPatrol","title":"block() - ChainPatrol","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/sdk/threat-detector/instance-methods/block","matchLevel":0},"es":{"href":"/es/sdk/threat-detector/instance-methods/block","matchLevel":1}}},"lastModified":"2026-11-17T13:02:46.553Z","originalFileLocation":"sdk/threat-detector/instance-methods/block.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ChainPatrol\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"block() - ChainPatrol\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ChainPatrol\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chainpatrol.mintlify.site/docs/_mintlify/api/og/v2?division=Instance+methods\u0026amp;title=block%28%29\u0026amp;description=Add+a+URL+or+domain+to+the+ThreatDetector+local+blocklist+so+subsequent+url%28%29+checks+return+BLOCKED+status+along+with+the+ChainPatrol+warning+redirectUrl.\u0026amp;theme=4f404989bcfc71874edcffb9\u0026amp;signature=d8d70ffae312645297c6b06b6c299358630cd2cb843e0818bbeab0aa852cfa51\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"block() - ChainPatrol\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chainpatrol.mintlify.site/docs/_mintlify/api/og/v2?division=Instance+methods\u0026amp;title=block%28%29\u0026amp;description=Add+a+URL+or+domain+to+the+ThreatDetector+local+blocklist+so+subsequent+url%28%29+checks+return+BLOCKED+status+along+with+the+ChainPatrol+warning+redirectUrl.\u0026amp;theme=4f404989bcfc71874edcffb9\u0026amp;signature=d8d70ffae312645297c6b06b6c299358630cd2cb843e0818bbeab0aa852cfa51\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/chainpatrol/NioFQGDQy3PBOTVO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ChainPatrol\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6622DC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/sdk/threat-detector/instance-methods/block.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://chainpatrol.com/docs/es/sdk/threat-detector/instance-methods/block\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://chainpatrol.com/#organization\",\"name\":\"ChainPatrol\",\"url\":\"https://chainpatrol.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chainpatrol/R_CITzEDbsciFTsn/logo/light.svg?fit=max\u0026auto=format\u0026n=R_CITzEDbsciFTsn\u0026q=85\u0026s=8ca4a8411113008ec8f9a57dec249989\"}},{\"@type\":\"WebSite\",\"@id\":\"https://chainpatrol.com/docs#website\",\"name\":\"ChainPatrol\",\"url\":\"https://chainpatrol.com/docs\",\"publisher\":{\"@id\":\"https://chainpatrol.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block#webpage\",\"url\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\",\"name\":\"block()\",\"description\":\"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\",\"dateModified\":\"2026-11-17T13:02:46.553Z\",\"isPartOf\":{\"@id\":\"https://chainpatrol.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://chainpatrol.com/docs/sdk/threat-detector/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ThreatDetector\",\"item\":\"https://chainpatrol.com/docs/sdk/threat-detector/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Instance methods\",\"item\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/url\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"block()\",\"item\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block#article\",\"headline\":\"block()\",\"name\":\"block()\",\"description\":\"Add a URL or domain to the ThreatDetector local blocklist so subsequent url() checks return BLOCKED status along with the ChainPatrol warning redirectUrl.\",\"url\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block\",\"mainEntityOfPage\":{\"@id\":\"https://chainpatrol.com/docs/sdk/threat-detector/instance-methods/block#webpage\"},\"dateModified\":\"2026-11-17T13:02:46.553Z\",\"publisher\":{\"@id\":\"https://chainpatrol.com/#organization\"},\"isPartOf\":{\"@id\":\"https://chainpatrol.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ChainPatrol\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ChainPatrol\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/sdk/threat-detector/instance-methods/block.md","siteName":"ChainPatrol","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/what-we-do/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integration/discord"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/external-api/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"JavaScript SDK","groups":[{"group":"@chainpatrol/sdk","pages":[{"title":"ChainPatrol JavaScript SDK Overview","href":"/sdk/overview"},{"title":"ChainPatrol SDK Quickstart","href":"/sdk/quickstart"}]},{"group":"API Reference","pages":[{"group":"ThreatDetector","pages":[{"title":"ThreatDetector Class Overview","href":"/sdk/threat-detector/overview"},{"title":"ThreatDetector Constructor","href":"/sdk/threat-detector/constructor"},{"group":"Instance methods","pages":[{"title":"url()","href":"/sdk/threat-detector/instance-methods/url"},{"title":"allow()","description":"Add a URL or domain to the ThreatDetector local allowlist so subsequent url() checks return an ALLOWED status without calling the ChainPatrol API.","href":"/sdk/threat-detector/instance-methods/allow"},{"title":"block()","href":"/sdk/threat-detector/instance-methods/block"},{"title":"ignore()","description":"Add a domain to the ThreatDetector ignorelist when a user chooses to continue at their own risk, preventing repeated redirects to the warning page.","href":"/sdk/threat-detector/instance-methods/ignore"}]}]},{"group":"Storage","pages":[{"title":"Storage Adapters for ThreatDetector Caching","href":"/sdk/storage/overview"},{"title":"Browser","href":"/sdk/storage/browser"},{"title":"Extension","href":"/sdk/storage/extension"},{"title":"Memory","href":"/sdk/storage/memory"}]},{"group":"Relay","pages":[{"title":"Relay Class for Warning-Page Events","href":"/sdk/relay/overview"},{"group":"Static methods","pages":[{"title":"send()","href":"/sdk/relay/static-methods/send"},{"title":"run()","href":"/sdk/relay/static-methods/run"},{"title":"on()","href":"/sdk/relay/static-methods/on"}]}]},{"group":"ChainPatrolClient","pages":[{"title":"ChainPatrolClient Overview","href":"/sdk/chainpatrol-client/overview"},{"title":"ChainPatrolClient Constructor","href":"/sdk/chainpatrol-client/constructor"},{"group":"Instance methods","pages":[{"title":"asset.check","href":"/sdk/chainpatrol-client/instance-methods/asset-check"},{"title":"asset.list","href":"/sdk/chainpatrol-client/instance-methods/asset-list"},{"title":"asset.submit","href":"/sdk/chainpatrol-client/instance-methods/asset-submit"},{"title":"report.create","href":"/sdk/chainpatrol-client/instance-methods/report-create"}]}]}]}]},{"tab":"Glossary","pages":[{"title":"Glossary","href":"/glossary/overview"}]}]},{"language":"es","pages":[{"title":"es","href":"/es/sdk/threat-detector/instance-methods/block"}]}]},"basePath":"","title":"block() - ChainPatrol","deploymentId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","buildId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","dynamics":[],"chunks":[]}