Package org.tailormap.api.controller
Class GeoServiceProxyController
java.lang.Object
org.tailormap.api.controller.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildOgcProxyRequestParams
(org.springframework.util.MultiValueMap<String, String> originalServiceParams, org.springframework.util.MultiValueMap<String, String> requestParams) org.springframework.http.ResponseEntity<?>
proxy
(Application application, GeoService service, GeoServiceLayer layer, GeoServiceProtocol protocol, jakarta.servlet.http.HttpServletRequest request)
-
Constructor Details
-
GeoServiceProxyController
-
-
Method Details
-
proxy
@RequestMapping(method={GET,POST}) public org.springframework.http.ResponseEntity<?> proxy(@ModelAttribute Application application, @ModelAttribute GeoService service, @ModelAttribute GeoServiceLayer layer, @PathVariable("protocol") GeoServiceProtocol protocol, jakarta.servlet.http.HttpServletRequest request) -
buildOgcProxyRequestParams
-