replacePassthroughPrefix

fun replacePassthroughPrefix(path: String, replacement: String): String

Replaces the PATH_PREFIX at the start of path with replacement, if present. If the path is not a passthrough path, it is returned unchanged.

Return

the path with the prefix replaced, or the original path

Parameters

path

the URL to process

replacement

the string to substitute for PATH_PREFIX