prefix = $prefix; } public function process(ServerRequestInterface $request, DelegateInterface $delegate) { $uri = $request->getUri(); $path = $uri->getPath(); $path = preg_replace('#^' . $this->prefix . '#', '', $path); $uri = $uri->withPath($path); return $delegate->process($request->withUri($uri)); } }