Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-799

Rewrite rules for handling of trailing slash '/'

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      I am trying to use knox as a proxy for superset which is a flask application.
      Flask applications have behave differently when we add or remove trailing slash in the URL.

      In superset we have urls both with and without trailing slash and the expected behavior is to keep trailing ‘/‘ if its in the input URL I.e do exact match for the path and substitute it in template including trailing ‘/'.

      Consider the case of of these two URLs -
      1) /users/list/
      2) /users/add
      Now when I use following rewrite rule -

      <rule dir="IN" name="SUPERSET-UI/superset-ui/inbound/path" pattern="*://*:*/**/superset-ui/{path=**}">
        <rewrite template="{$serviceUrl[SUPERSET-UI]}/{path=**}"/>
      </rule>
      

      It removes trailing slash from all the matching urls.
      The expected behavior for knox is to preserve trailing '/' in the urls while rewriting.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nishantbangarwa Nishant Bangarwa
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: