updated allowed method check in preflight