Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-852

Allow applying 'upstream' policy on the original path - when used together with URL rewriting

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 2.2 CR2
    • 2.2 CR1, SaaS
    • Gateway
    • None

    Description

      Currently, when upstream and URL rewriting policies are used together, the upstream policy will always take into account the rewritten path instead of the original one, regardless of the position of the policies in the chain (i.e. even when the upstream policy is placed before URL rewriting).

      This is counter-intuitive (although explained in the docs), and doesn't support the following use case:

      I want to rewrite both the URL and the upstream based on the path prefix, e.g.

      http://gateway/v1/books/123 => http://apiv1.myapi.com/books/123
      http://gateway/v2/authors/44 => http://apiv2.myapi.com/authors/44
      

      This is not possible, because regardless of the order of the policies, the URL rewrite, which acts in the rewrite phase changed the path and removes the /v1 and /v2 prefix, so the upstream policy, that acts in the content phase doesn't see it and can't change the upstream as expected.

      Attachments

        Activity

          People

            dortiz-1 David Ortiz (Inactive)
            rhn-support-dmayorov Daria Mayorova
            Martin Kudlej Martin Kudlej
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: