making cors work for put requests also