Skip to content

Commit

Permalink
Update doc for the HTTP_METHOD_SPECIFY property item (alibaba#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyuguang authored and sczyh30 committed Nov 6, 2019
1 parent 7c2c137 commit b6c2979
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sentinel-adapter/sentinel-web-servlet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class FilterConfig {
registration.addUrlPatterns("/*");
registration.setName("sentinelCommonFilter");
registration.setOrder(1);

// Set whether to support the specified HTTP method for the filter.
registration.addInitParameter(CommonFilter.HTTP_METHOD_SPECIFY, "false");
return registration;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/
public class CommonFilter implements Filter {

private final static String HTTP_METHOD_SPECIFY = "HTTP_METHOD_SPECIFY";
public final static String HTTP_METHOD_SPECIFY = "HTTP_METHOD_SPECIFY";
/**
* Use the path of the url as the context, if necessary, but pay attention to the number of context EntranceNode
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public FilterRegistrationBean sentinelFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new CommonFilter());
registration.addUrlPatterns("/*");
registration.addInitParameter("HTTP_METHOD_SPECIFY", "true");
registration.addInitParameter(CommonFilter.HTTP_METHOD_SPECIFY, "true");
registration.setName("sentinelFilter");
registration.setOrder(1);

Expand Down

0 comments on commit b6c2979

Please sign in to comment.