clients see <code>https</code>:</p>
<pre><code class="language-js">const mid = ctx =&gt; {
  expect(ctx.secure).toBe(false);
};

// Test it
run(mid).get(&#39;/&#39;);
</code></pre>
<h2 id="xhr">.xhr</h2>
<p>A boolean set to true if the request was done through AJAX. Specifically, if <code>X-Requested-With</code> is <code>“XMLHttpRequest”</code>:</p>
<pre><code class="language-js">const mid = ctx =&gt; {
  expect(mid.xhr).toBe(false);
};

run(mid).get(&#39;/&#39;);
</code></pre>
<h2 id="keep-reading">Kee