How do I set the origin of my notebook url?


I am trying to set up notebooks for an internal use case of our team. The notebook is linked to url [abc | pqr | com] and it is added as an iframe on page def | pqr | com

I want to detect user clicks on the iframe. I came across this stackoverflow question

So I need to set document.domain = ‘pqr . com’ on page and abc . pqr . com. The abc page is coming directly from spinning up a notebook. So it looks like I need a way to add “document.domain = pqr . com” somewhere in the process of spinning up a notebook.

I was hoping I can do this through the file OR through some other external way without having to mess with the core notebook repo.

Does anyone have ideas or previous experience with trying to achieve this?

Thank you!!!

Looks like I can use custom.js to set this.

But I am unable to add custom.js to the notebook in my docker container.

Has anyone tried using custom.js before? How did you add it to the docker container?