[ 
https://issues.apache.org/jira/browse/KNOX-729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15554423#comment-15554423
 ] 

Nishant Bangarwa edited comment on KNOX-729 at 10/7/16 7:50 AM:
----------------------------------------------------------------

It seems I might be hitting this,  Any workarounds available for this ? 

FWIW, In my case the html page has links to css as follows -

{code:xml}
  <style type="text/css">@import "old-console/css/style.css";</style>
  <style type="text/css">@import "old-console/css/demo_table.css";</style>
{code}

and I am using below rule to rewrite it, but its not working - 

{code:xml}
 <rule dir="OUT" name="DRUID-INDEXER-UI/druid-indexer-ui/outbound/css">
    <rewrite template="{$frontend[url]}/druid-indexer-ui/old-console/css"/>
  </rule>
 <filter name="DRUID-INDEXER-UI/druid-indexer-ui/outbound/links2">
    <content type="*/html">
      <apply path="old-console/css" 
rule="DRUID-INDEXER-UI/druid-indexer-ui/outbound/css"/>
    </content>
  </filter>
{code}



was (Author: nishantbangarwa):
It seems I might be hitting this,  Any workarounds available for this ? 

FWIW, In my case the html page has links to css as follows -

{code:xml}
  <style type="text/css">@import "old-console/css/style.css";</style>
   <style type="text/css">@import "old-console/css/demo_table.css";</style>
{code}

and I am using below rule to rewrite it - 

```
 <rule dir="OUT" name="DRUID-INDEXER-UI/druid-indexer-ui/outbound/css">
    <rewrite template="{$frontend[url]}/druid-indexer-ui/old-console/css"/>
  </rule>
 <filter name="DRUID-INDEXER-UI/druid-indexer-ui/outbound/links2">
    <content type="*/html">
      <apply path="old-console/css" 
rule="DRUID-INDEXER-UI/druid-indexer-ui/outbound/css"/>
    </content>
  </filter>
```


> Rewrite rules for attributes of html content applied to a filter don't work
> ---------------------------------------------------------------------------
>
>                 Key: KNOX-729
>                 URL: https://issues.apache.org/jira/browse/KNOX-729
>             Project: Apache Knox
>          Issue Type: Bug
>            Reporter: Sumit Gupta
>
> If you are to apply rules to a filter with html content, the rules don't get 
> applied to the attributes.
> e.g.
> {code}
>  <filter name="AMBARIUI/ambari/outbound/mainpage">
>         <content type="*/html">
>             <apply path="stylesheets/vendor.css" 
> rule="AMBARIUI/ambari/outbound/vendorcss"/>
>         </content>
>     </filter>
> {code}
> will not rewrite the attribute value of stylesheets/vendor.css in a html 
> page. A similar construct works for Javascript content.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to