Request header field Access-Control-Allow-Methods is not allowed by Access-Control-Allow-Headers in preflight response
问题 I'm using Angular in the frontend and Jersey for backend. I am getting an exception when I execute my PUT request. This is the Angular code: const header=new Headers({'Content-Type':'application/x-www-form-urlencoded'}); header.append("Access-Control-Allow-Methods", "POST"); header.append("Access-Control-Allow-Headers","Access-Control-Allow-Origin"); return this.http.post('http://localhost:8080',home,{headers: header}) .pipe(map((response: Response)=>{return response.json();})); This is my