spring-framework / org.springframework.web.servlet.support / ServletUriComponentsBuilder / fromContextPath

fromContextPath

open static fun fromContextPath(request: HttpServletRequest): ServletUriComponentsBuilder

Prepare a builder from the host, port, scheme, and context path of the given HttpServletRequest.

Note: This method extracts values from "Forwarded" and "X-Forwarded-*" headers if found. See class-level docs.