bypass region middleware when it is not the API (bug 784843 and bug 892704)