Support PUT/DELETE/PATCH/HEAD/OPTIONS/TRACE methods #43
This commit is contained in:
@@ -92,6 +92,9 @@ public class AggregateFilter implements WebFilter {
|
||||
|
||||
String path = WebUtils.getClientReqPathPrefix(exchange) + serviceId + WebUtils.getBackendPath(exchange);
|
||||
String method = request.getMethodValue();
|
||||
if (HttpMethod.HEAD.matches(method.toUpperCase())) {
|
||||
method = HttpMethod.GET.name();
|
||||
}
|
||||
AggregateResource aggregateResource = configLoader.matchAggregateResource(method, path);
|
||||
if (aggregateResource == null) {
|
||||
if (WebUtils.getApiConfigType(exchange) == ApiConfig.Type.SERVICE_ARRANGE) {
|
||||
|
||||
@@ -60,6 +60,8 @@ public class CorsFilterConfig {
|
||||
config.addAllowedMethod(HttpMethod.HEAD);
|
||||
config.addAllowedMethod(HttpMethod.PUT);
|
||||
config.addAllowedMethod(HttpMethod.DELETE);
|
||||
config.addAllowedMethod(HttpMethod.PATCH);
|
||||
config.addAllowedMethod(HttpMethod.TRACE);
|
||||
|
||||
config.addAllowedHeader("*");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user