Skip to content

Commit

Permalink
http interfaces between FEs are not redirected (apache#19590)
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjinhou authored May 17, 2023
1 parent 48ec530 commit 802e551
Showing 1 changed file with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,29 @@ public void configure(WebAppContext context) throws Exception {

ConstraintSecurityHandler handler = new ConstraintSecurityHandler();

ConstraintMapping mappingGet = new ConstraintMapping();
mappingGet.setConstraint(constraint);
mappingGet.setPathSpec("/*");
mappingGet.setMethod("GET");
handler.addConstraintMapping(mappingGet);
ConstraintMapping mappingGetRest = new ConstraintMapping();
mappingGetRest.setConstraint(constraint);
mappingGetRest.setPathSpec("/rest/*");
mappingGetRest.setMethod("GET");
handler.addConstraintMapping(mappingGetRest);

ConstraintMapping mappingGetAPI = new ConstraintMapping();
mappingGetAPI.setConstraint(constraint);
mappingGetAPI.setPathSpec("/api/*");
mappingGetAPI.setMethod("GET");
handler.addConstraintMapping(mappingGetAPI);

ConstraintMapping mappingGetDump = new ConstraintMapping();
mappingGetDump.setConstraint(constraint);
mappingGetDump.setPathSpec("/dump");
mappingGetDump.setMethod("GET");
handler.addConstraintMapping(mappingGetDump);

ConstraintMapping mappingGetMetrics = new ConstraintMapping();
mappingGetMetrics.setConstraint(constraint);
mappingGetMetrics.setPathSpec("/metrics");
mappingGetMetrics.setMethod("GET");
handler.addConstraintMapping(mappingGetMetrics);

ConstraintMapping mappingDel = new ConstraintMapping();
mappingDel.setConstraint(constraint);
Expand Down

0 comments on commit 802e551

Please sign in to comment.