Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 349 Bytes

File metadata and controls

14 lines (10 loc) · 349 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(false)
new_path = "/foo"

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