<p dir="auto">Currently --allow-net=domain/A has the same effect as --allow-net=domain. It would be nice to be able to only allow network access to an URL with a given domain &amp; path prefix.</p>
<p dir="auto">Deno should allow URLs to be allowed in <code class="notranslate">--allow-net</code> and or other than domain names and ports pair.</p>
<p dir="auto">As of current to run this simple JavaScript file:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fetch('http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/').then( (resp) =&gt; {
    console.log(resp)
} )"><pre class="notranslate"><span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-s">'http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">resp</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">resp</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-kos">)</span></pre></div>
<p dir="auto">I would need to allow all URLs possible with <code class="notranslate">gist.githubusercontent.com</code>, or allow any Domain names URL(which both are not fully secure):</p>
<p dir="auto">All URLs possible with <code class="notranslate">gist.githubusercontent.com</code>:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno --allow-net=&quot;gist.githubusercontent.com&quot; test.js                                 Does compile
Response {
  responce data...
}"><pre class="notranslate">deno --allow-net=<span class="pl-s"><span class="pl-pds">"</span>gist.githubusercontent.com<span class="pl-pds">"</span></span> test.js                                 Does compile
Response {
  responce data...
}</pre></div>
<p dir="auto">Allow any Domain names URL:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno --allow-net test.js
Does compile
Response {
  responce data...
}
"><pre class="notranslate">deno --allow-net test.js
Does compile
Response {
  responce data...
}
</pre></div>
<p dir="auto">And if I try running the secure way, I get en error:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno --allow-net=&quot;http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh&quot; test.js
Does compile
error: Uncaught PermissionDenied: network access to &quot;http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/&quot;, run again with the --allow-net flag
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
    at async fetch ($deno$/web/fetch.ts:591:27)"><pre class="notranslate">$ deno --allow-net=<span class="pl-s"><span class="pl-pds">"</span>http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh<span class="pl-pds">"</span></span> test.js
Does compile
error: Uncaught PermissionDenied: network access to <span class="pl-s"><span class="pl-pds">"</span>http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/<span class="pl-pds">"</span></span>, run again with the --allow-net flag
    at unwrapResponse (<span class="pl-smi">$deno</span>$/ops/dispatch_json.ts:43:11)
    at Object.sendAsync (<span class="pl-smi">$deno</span>$/ops/dispatch_json.ts:98:10)
    at async fetch (<span class="pl-smi">$deno</span>$/web/fetch.ts:591:27)</pre></div>
<p dir="auto">Thanks,<br>
Dex Devlon</p>