Restored OPTIONS handling to how it was in our TouchDB fork