Allow custom IndexDocument and ErrorDocument