title: AEM 6.x: How do I temporarily/programmatically disable the link checker? (trying to return a JSON with links back to browser)
body: <p>So I have a Sling servlet that reads data from another API (let's call it APIX) and APIX gives me the data in JSON format.</p>
  
  <p>When I debugged my code, it seems the response I get from APIX is intact.</p>
  
  <p>When I pass the JSON I got from APIX to browser, I can see that AEM has "link checked" all the links I have in the JSON. I don't want AEM to do anything with my data.</p>
  
  <p>Base on this <a href="https://helpx.adobe.com/experience-manager/kb/DisableLinkChecker.html" rel="nofollow noreferrer">Adobe page</a>, I added these lines in my code:</p>
  
  <pre><code>protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
    LinkCheckerSettings linkCheckerSettings = LinkCheckerSettings.fromRequest(request);
    linkCheckerSettings.setIgnoreExternals(true);
  
    //body of the code here
  
    response.setCharacterEncoding("UTF-8");
    response.setContentType("application/json;charset=UTF-8");
  
    printWriter.write(jsonResponse);
  
    linkCheckerSettings.setIgnoreExternals(false);
  }
  </code></pre>
  
  <p>No effect. I can still see these string</p>
  
  <pre><code>&lt;img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: _blank\\" title="invalid link: _blank\\" border="0"&gt;
  </code></pre>
  
  <p>everywhere.</p>
  
  <p>I then tried disabling Linkchecker (via <a href="http://localhost:4502/system/console/configMgr/com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory" rel="nofollow noreferrer">configMgr/Day CQ Link Checker Transformer</a>) and still no effect.</p>
  
  <p>How can I do it?</p>
  
  <p>I called the Slng servlet by typing this URL in my browser: <a href="http://localhost:4502/servlets/getpublications?name=john.smith" rel="nofollow noreferrer">http://localhost:4502/servlets/getpublications?name=john.smith</a></p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is a sample of the JSON data I'm getting from APIX (debugging on IntelliJ):</p>
  
  <pre><code>"LINKS":[
          "&lt;a x-cq-linkchecker=\"skip\" target=\"_blank\" href=\"http:\/\/www.google23.com\"&gt;[Web Link]&lt;\/a&gt;"
          ]
  </code></pre>
  
  <p>This is what I'm getting on the browser (the a tag was somehow replaced by an img tag)</p>
  
  <pre><code>"LINKS":[
           "&lt;img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: _blank\\" title="invalid link:_blank\\" border="0"&gt;                        [Web Link]&lt;\/a&gt;"
          ]
  </code></pre>
  
  <p>I have tried using valid and skip for x-cq-linkchecker but nothing happens.</p>
  
  <p><strong>Day CQ Link Checker Transformer config screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/6x0Ag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6x0Ag.png" alt="enter image description here"></a></p>