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

Rewrite function for accessing header values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.6.0
    • None
    • Server
    • None

    Description

      I recently ran into a situation where it would have been useful to have access to header values in the rewrite rules. In particular it would be useful sometimes to API version with a header like this.

          <match pattern="{scheme}://{host}:{port}/api/{path=**}?{**}">
              <rewrite template=""{scheme}://{host}:{port}/api/{$header[version]}/{path}?{**}""/>
          </match>
      

      As implied above the rewrite function plugin model seems like an excellent way to provide basic access to header information.

      Attachments

        1. KNOX-618_001.patch
          32 kB
          Kevin Minder
        2. KNOX-618.002.patch
          37 kB
          Jeffrey E Rodriguez

        Activity

          People

            kminder Kevin Minder
            kminder Kevin Minder
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: