Class ServerContextPathProviderUtils

java.lang.Object
io.micronaut.security.config.ServerContextPathProviderUtils

@Internal public final class ServerContextPathProviderUtils extends Object
Utility methods to prepend a URL with the context path provided via ServerContextPathProvider.
Since:
3.7.1
Author:
Sergio del Amo
  • Method Details

    • prependContextPath

      @NonNull public static @NonNull String prependContextPath(@NonNull @NonNull String url, @NonNull @NonNull io.micronaut.http.context.ServerContextPathProvider serverContextPathProvider)
      Parameters:
      url - The url to be prefixed by the context path
      serverContextPathProvider - context path provider
      Returns:
      the url prepended with the context path. For url /bar and context path foo the method returns /foo/bar