Added a way to switch sites in the middleware that isn't based on domain

This is mildly infuriating to set up and test, since it can't be tested on the staging db or local solr, and for some reason it's only working 95% of the time for me. It's a ridiculously small change, so the only reason I can figure it wouldn't be working is because of some sort of strange caching done by Chrome. I would really appreciate it if someone else would try this out.

All tests pass.