Unfortunately, didn't work for me -- still having the same problem.
(And now the server doesn't seem to start, either....)
I've been able to get Octoprint running very well until I start trying to get the system to boot straight to touchui on the 7" raspberry screen. I get the same symptoms, shows a white screen with "refused to connect". I went through the fix, but it didn't help.
I thought maybe I needed to set the autologin, so I edited the yaml file but that didn't help.
And now, somehow, octoprint is no longer starting at all, even with "sudo service octoprint restart". That seems to work, but the server doesn't start and there aren't any new entries in the log file, either...
Ugh. Looks like I'm going to have to reformat and re-etch octopi again....