Refactor hardcoded basePath, its now part of request object wich is correct way, because _SERVER follows the request.