Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25040

Enable Tomcat's rewrite valve

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.2
    • Component/s: Runtime
    • Release Notes Description:
      Hide

      Making Use of Tomcat 8 Rewrite Valve.
      It is now possible to contribute rules to Tomcat Rewrite Valve by leveraging our deployment preprocessor.

      Ex:

      deployment-fragment.xml
      <?xml version="1.0"?>
      <fragment version="1">
        <!-- JSF permalink redirect -->
        <extension target="rewrite#RULE">
          RewriteRule ^/nxdoc/default/(.*)/view_documents /ui/#!/doc/$1 [NE,R]
        </extension>
      
        <!--  ES6 / ES5 code -->
        <extension target="rewrite#RULE">
          RewriteCond  %{HTTP_USER_AGENT} .*Chrome.*
          RewriteRule ^/shop/(.*) /shop/es6-bundled/$1 [L]
          RewriteRule ^/shop/(.*) /shop/es5-bundled/$1 [L]
        </extension>
      </fragment>
      
      Show
      Making Use of Tomcat 8 Rewrite Valve. It is now possible to contribute rules to Tomcat Rewrite Valve by leveraging our deployment preprocessor. Ex: deployment-fragment.xml <?xml version= "1.0" ?> <fragment version= "1" > <!-- JSF permalink redirect --> <extension target= "rewrite#RULE" > RewriteRule ^/nxdoc/ default /(.*)/view_documents /ui/#!/doc/$1 [NE,R] </extension> <!-- ES6 / ES5 code --> <extension target= "rewrite#RULE" > RewriteCond %{HTTP_USER_AGENT} .*Chrome.* RewriteRule ^/shop/(.*) /shop/es6-bundled/$1 [L] RewriteRule ^/shop/(.*) /shop/es5-bundled/$1 [L] </extension> </fragment>
    • Sprint:
      nxNS Sprint 10.2.3

      Description

      Since Tomcat 8 a rewrite valve is available for usage. We should enable it by default and allow contributing new rules by leveraging our deployment preprocessor.

      Ex:

      deployment-fragment.xml
      <?xml version="1.0"?>
      <fragment version="1">
        <!-- JSF permalink redirect -->
        <extension target="rewrite#RULE">
          RewriteRule ^/nxdoc/default/(.*)/view_documents /ui/#!/doc/$1 [NE,R]
        </extension>
      
        <!--  ES6 / ES5 code -->
        <extension target="rewrite#RULE">
          RewriteCond  %{HTTP_USER_AGENT} .*Chrome.*
          RewriteRule ^/shop/(.*) /shop/es6-bundled/$1 [L]
          RewriteRule ^/shop/(.*) /shop/es5-bundled/$1 [L]
        </extension>
      </fragment>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4 hours
                4h