Trying to identify what patch if any resolves the following oddity for Knox 
0.12.


Consider the following rule found in the HDFSUI Service.


<rule dir="OUT" name="HDFSUI/content/static" pattern="/static/{**}">
    <rewrite template="{gateway.url}/hdfs/static/{**}"/>
</rule>


And the following HTML Snippet

<script type="text/javascript" src="/static/jquery-1.10.2.min.js"></script>
<script type="text/javascript" 
src="/static/bootstrap-3.0.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/dust-full-2.0.0.min.js"></script>
<script type="text/javascript" src="/static/dust-helpers-1.1.1.min.js"></script>
<script type="text/javascript" src="/static/dfs-dust.js"></script>
<script type="text/javascript" src="/static/rest-csrf.js"></script>

And finally the debug log.
No rule matching URL: /static/jquery-1.10.2.min.js, direction: OUT
Rewrote URL: /static/bootstrap-3.0.2/js/bootstrap.min.js, direction: OUT via 
implicit rule: HDFSUI/content/static to URL: 
https://knox.test.org:443/gateway/admin/hdfs/static/bootstrap-3.0.2/js/bootstrap.min.js
Rewrote URL: /static/dust-full-2.0.0.min.js, direction: OUT via implicit rule: 
HDFSUI/content/static to URL: 
https://knox.test.org:443/gateway/admin/hdfs/static/dust-full-2.0.0.min.js
Rewrote URL: /static/dust-helpers-1.1.1.min.js, direction: OUT via implicit 
rule: HDFSUI/content/static to URL: 
https://knox.test.org:443/gateway/admin/hdfs/static/dust-helpers-1.1.1.min.js
Rewrote URL: /static/dfs-dust.js, direction: OUT via implicit rule: 
HDFSUI/content/static to URL: 
https://knox.test.org:443/gateway/admin/hdfs/static/dfs-dust.js
Rewrote URL: /static/rest-csrf.js, direction: OUT via implicit rule: 
HDFSUI/content/static to URL: 
https://knox.test.org:443/gateway/admin/hdfs/static/rest-csrf.js


After lots of testing I've determined that Knox will not rewrite anything like 
this.

<script type="text/javascript" src="/static/jquery.min.js"></script>
<a href="/static/jquery.min.js">Hello World </a>

That's oddly specific. Any variation I can try that includes jquery.min.js 
won't rewrite but jjquery.min.js will.

Thanks
Shawn Weeks

Reply via email to