fix logic for proxied sites