handle options request before post