Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 344 Bytes

path_prepend.md

File metadata and controls

14 lines (10 loc) · 344 Bytes

Prepend request path

This DataScript will prepend requests with an additional path, unless the path is already present.

Please add this DataScript in the DataScript section on a Virtual Service.

path = avi.http.get_path()
new_path = "/foo"

if not string.beginswith(path, new_path) then
   avi.http.set_path(new_path..path)
end