A self taught programmer with a passion to learn and update my skills.
- Calgary, Alberta
Block or Report
Block or report samritbk
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned Loading
-
-
-
-
Remove / in Spark Java (Allow with /...
Remove / in Spark Java (Allow with / and without /) 1Spark.before((req, res) -> {
2String path = req.pathInfo();
3if (path.endsWith("/") && path.length() != 1) // length prevents redirect on homepage http://example.com/ <--
4res.redirect(path.substring(0, path.length() - 1));
5 -
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.