Made a few changes to support running behind a reverse proxy.
Put path to rcswitch in settings.js