Package 

Class RedirectToLowercasePathPlugin

  • All Implemented Interfaces:
    io.javalin.core.plugin.Plugin , io.javalin.core.plugin.PluginLifecycleInit

    
    public final class RedirectToLowercasePathPlugin
     implements Plugin, PluginLifecycleInit
                        

    This plugin redirects requests with uppercase/mixcase paths to lowercase paths Ex: /Users/John -> /users/John (if endpoint is /users/{userId}) It does not affect the casing of path-params and query-params, only static URL fragments ('Users' becomes 'users' above, but 'John' remains 'John'). When using this plugin, you can only add paths with lowercase URL fragments.

    • Method Summary

      Modifier and Type Method Description
      Unit init(Javalin app) Initialize properties and event listener.
      Unit apply(Javalin app)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RedirectToLowercasePathPlugin

        RedirectToLowercasePathPlugin()
    • Method Detail

      • init

         Unit init(Javalin app)

        Initialize properties and event listener. This will be called before any handler is registered. It is not allowed to register handler during this lifecycle.