Restrict navigating to the different url

According to the solution, users with a specific role should have access only to provided link to the notebook.

Is it possible to somehow restrict users from leaving this URL (restrict observing lab itself)?
Ideally, always redirect the user to the provided link (or default URL of the spawner)

The user’s browser can navigate where it please, and a JupyterHub on the cloud, just like any other webserver, can’t restrict that.

I meant leaving this page inside the lab: observe other notebooks, etc.
Maybe rights to viewing other pages can be restricted and the user will see 403 responses if he trying to see pages different from notebook details.

Other web servers can easily redirect users to the same url or response with 403 if it is implemented by the developer. And I’m looking for such a tweak in jupyter.