Resolve relative paths at middleware setup