Added support for different origin server configs

Added support for different origin server configs, but I still need
to make a few more blackbox tests.