modify-outgoing-request-path

This behavior provides for altering the request URI before it is sent to the origin server.

The setting that can be specified by the type parameter (required) is as follows.

  • remove – removes the first occurrence of the value from the outgoing request URI.
    • value(required) – path_string: the contiguous string of characters to be removed from the forward request. The value should take the form "/dir1/dir2/".
  • replace-all – the complete original request path (but not the filename, extension, or query string) is replaced with the path specified in the value element.
    • value(required) – path_string: the URI path to replace the entire original incoming URI path. The value should take the form "/dir1/dir2/".
  • replace – searches for the "find" portion of the value string in the original request URI and replaces it with the "replace" portion of the value. In this case the value must take the form /find/path/###/replace/path/, where ### is the delimiter separating the string to find and the replacement string.
    • value(required) – find_string###replace_string: The value should take the form "find_path###replace_path".

      "###" is the specific delimiter pattern required between the find_string and replace_string

      NOTE: Only the first instance of the find_string in the origin path is replaced. For example:value = "/dir1/dir2/###/dir3/dir4/"


     {
       "rules": [
         {
           "matches": [
             {
               "name": "http-method",
               "value": "GET"
             }
           ],
           "behaviors": [
             {
               "name" : "modify-outgoing-request-path",
               "type" : "replace",
               "value": "/dir1/dir2/###/dir3/dir4/"
             }
           ]
         }
       ]
     }