Redirect using a worker

Since at the moment there is no way to redirect CP’s, is there a simpler way to edit this worker to make it work?

You can make pretty simple and basic redirects using the _redirects file. For anything more advanced, you can now use workers in CP projects (below)
It’s still in open beta, but you can now create function handlers, or entire Workers with your CP project.

The URL cannot be redirected with a _redirects file though.