How can I set the domain for all server side session variables?

I want to set the domain for server side session variables so I can use them cross domain.

With the security provider we get options for that…
I tried to make my own extension but I believe that it should be set here in the config.js:

However I’m not sure. So advice is welcome!