A self taught programmer with a passion to learn and update my skills.
- Calgary, Alberta
Pinned Loading
- MahberApp
MahberApp PublicJava
- WinnipegTransit
WinnipegTransit PublicJava 1
- SubscriptionReminder
SubscriptionReminder PublicAbdi project
- Remove / in Spark Java (Allow with /...
Remove / in Spark Java (Allow with / and without /) 1Spark.before((req, res) -> {
2Stringpath = 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.
Uh oh!
There was an error while loading. Please reload this page.

