Try using rack cors gems