Update CorsPreflightService.java (#8387)

Adding DELETE & PUT

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
GQ 2022-08-26 14:00:55 +08:00 committed by GitHub
parent 52aad0bbdc
commit 518d318f0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ public class CorsPreflightService {
@Path("{any:.*}")
@OPTIONS
public Response preflight() {
Cors cors = Cors.add(request, Response.ok()).auth().allowedMethods("GET", "POST", "HEAD", "OPTIONS").preflight();
Cors cors = Cors.add(request, Response.ok()).auth().allowedMethods("GET", "POST", "DELETE", "PUT", "HEAD", "OPTIONS").preflight();
return cors.build();
}