eoxserver
eoxserver copied to clipboard
Wps getcapabilities offered operations urls
GetCapabilities documents of WPS 1.0 and WPS 2.0 interfaces do not list Operations with the actual service URL but a one from configuration, so if the service is actually accessible behind more URLs, it is not possible to guarantee that the same hostname that is used to send the request will also appear in the getcapabilities links.
BEFORE: service url from configuration currently used in WPS: conf.http_service_url
(this config is marked as mandatory in eoxserver user guide) yields for example: <ows:Get xlink:href="pvs/ows?"/> or in tests http://testserver/ows
AFTER: Use the request absolute URI itself (as is in case of WMS and WCS service GetCapabilities) which would yield <ows:Get xlink:href="http://hostname_used_for_request/ows?"/>
- tests were not updated, as the expected values stay the same (http://testserver/ows)
TODO, do this for WCS GetCapabilities as well.
Probably a right thing to do though it should be noted that this approach depends on the correct reverse-proxy configuration. When running behind a reverse proxy, Django will be able to resolve the public URL only if it receives the right forward headers.