KB Article #180035
Behavior of com.vordel.apimanager.uri.path.trailingSlash.preserve option
Problem
What is the behavior of com.vordel.apimanager.uri.path.trailingSlash.preserve in 7.5.3 and 7.6.2 when set to false or true ?
Resolution
In 7.6.2 SP2 with <VMArg name="-Dcom.vordel.apimanager.uri.path.trailingSlash.preserve=false"/>
Client request against an
- API which doesn't have trailingSlash for the Backend API
Frontend API exposure: https://apitest:8065/api_no_trail/m1
Backend API: http://localhost:8080/api_no_trail/m1
Request: https://apitest:8065/api_no_trail/m1?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 - expected behavior
Request: https://apitest:8065/api_no_trail/m1/?test1=1&test2=2 fails with 403 No Match found for request
Backend call: GET /api_no_trail/m1/ -expected behavior
- API which ends in a trailingSlash for the Backend API
Frontend: https://apitest:8065/api_with_trail/m2
Backend: http://localhost:8080/api_with_trail/m2/
Request: https://apitest:8065/api_with_trail/m2/?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
Request: https://apitest:8065/api_with_trail/m2?test1=1&test2=2 fails 403 No Match found for request
Backend call: GET /api_with_trail/m2 -expected behavior
<VMArg name="-Dcom.vordel.apimanager.uri.path.trailingSlash.preserve=true"/>
Client request against an
- API which doesn't have trailingSlash for the Backend API
Frontend API exposure: https://apitest:8065/api_no_trail/m1
Backend API: http://localhost:8080/api_no_trail/m1
Request: https://apitest:8065/api_no_trail/m1?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 - expected behavior
Request: https://apitest:8065/api_no_trail/m1/?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 -expected behavior
- API which ends in a trailingSlash for the Backend API
Frontend: https://apitest:8065/api_with_trail/m2/
Backend: http://localhost:8080/api_with_trail/m2/
Request: https://apitest:8065/api_with_trail/m2/?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
Request: https://apitest:8065/api_with_trail/m2?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
In 7.5.3 SP9 with <VMArg name="-Dcom.vordel.apimanager.uri.path.trailingSlash.preserve=false"/>
Client request against an
- API which doesn't have trailingSlash for the Backend API
Frontend API exposure: https://apitest:8065/api_no_trail/m1
Backend API: http://localhost:8080/api_no_trail/m1
Request: https://apitest:8065/api_no_trail/m1?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 - expected behavior
Request: https://apitest:8065/api_no_trail/m1/?test1=1&test2=2 fails 403 No Match found for request;
Backend call: GET /api_no_trail/m1/ -expected behavior
- API which ends in a trailingSlash for the Backend API
Frontend: https://apitest:8065/api_with_trail/m2
Backend: http://localhost:8080/api_with_trail/m2/
Request: https://apitest:8065/api_with_trail/m2/?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
Request: https://apitest:8065/api_with_trail/m2?test1=1&test2=2 fails 403 No Match found for request
Backend call: GET /api_with_trail/m2 -expected behavior
<VMArg name="-Dcom.vordel.apimanager.uri.path.trailingSlash.preserve=true"/>
Client request against an
- API which doesn't have trailingSlash for the Backend API
Frontend API exposure: https://apitest:8065/api_no_trail/m1
Backend API: http://localhost:8080/api_no_trail/m1
Request: https://apitest:8065/api_no_trail/m1?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 - expected behavior
Request: https://apitest:8065/api_no_trail/m1/?test1=1&test2=2 passes
Backend call: GET /api_no_trail/m1 -expected behavior
- API which ends in a trailingSlash for the Backend API
Frontend: https://apitest:8065/api_with_trail/m2/
Backend: http://localhost:8080/api_with_trail/m2/
Request: https://apitest:8065/api_with_trail/m2/?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
Request: https://apitest:8065/api_with_trail/m2?test1=1&test2=2 passes
Backend call: GET /api_with_trail/m2/ -expected behavior
Below is a matching table,only simple match examples and no "Content-Type" considered.
Default value is set to false.