Package nl.b3p.tailormap.api.controller
Class GeoServiceProxyController
- java.lang.Object
-
- nl.b3p.tailormap.api.controller.GeoServiceProxyController
-
@Validated @RequestMapping(path="/api/{viewerKind}/{viewerName}/layer/{appLayerId}/proxy/{protocol}") public class GeoServiceProxyController extends ObjectProxy 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
Constructors Constructor Description GeoServiceProxyController(AuthorizationService authorizationService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.springframework.util.MultiValueMap<String,String>buildOgcProxyRequestParams(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, String protocol, javax.servlet.http.HttpServletRequest request)
-
-
-
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)
-
-