Router always gives a 500 time out error

@virtahepoville first I’m not sure what you’re trying to do.
If you wish to redirect to anther page then you should use
.redirect() and not .ok().
For example:

import {redirect} from "wix-router";
export function private_Router(request) {
 return redirect("/"  +request.path[0]);
}

and If you wish to continue to the same page, then you should use:

return ok("private-page");