Set RequestFactory when instantiating

If it's set afterwards, it's too late for the ALLOWED_HOSTS check.