Class GeoServiceProxyController


  • @Validated
    @RequestMapping(path="/api/{viewerKind}/{viewerName}/layer/{appLayerId}/proxy/{protocol}")
    public class GeoServiceProxyController
    extends Object
    Proxy controller for OGC WMS and WMTS services. Does not attempt to hide the original service URL. Mostly useful for access to HTTP Basic secured services without sending the credentials to the client. The access control is handled by Spring Security and the authorizations configured on the service.

    Only supports GET requests. Does not support CORS, only meant for tailormap-viewer from the same origin.

    Implementation note: uses the Java 11 HttpClient. Spring cloud gateway can proxy with many more features but can not be used in a non-reactive application.

    • Constructor Detail

      • GeoServiceProxyController

        public GeoServiceProxyController​(AuthorizationService authorizationService)
    • Method Detail

      • proxy

        @RequestMapping(method={GET,POST})
        public org.springframework.http.ResponseEntity<?> proxy​(@ModelAttribute
                                                                Application application,
                                                                @ModelAttribute
                                                                GeoService service,
                                                                @ModelAttribute
                                                                GeoServiceLayer layer,
                                                                @PathVariable("protocol")
                                                                String protocol,
                                                                javax.servlet.http.HttpServletRequest request)
      • buildOgcProxyRequestParams

        public static org.springframework.util.MultiValueMap<String,​String> buildOgcProxyRequestParams​(org.springframework.util.MultiValueMap<String,​String> originalServiceParams,
                                                                                                             org.springframework.util.MultiValueMap<String,​String> requestParams)