make the code reverse-proxy friendly
(approach borrowed from etherpad)
relative path in example/index.html also
Merge pull request #88 from risacher/reverse-proxy-friendly

Reverse-proxy friendly