CORS support got lost in the nginx refactor

cc @hunterloftis @danieltdt