Geoserver工作区和代理

问题描述 投票:1回答:1

有人可以解释工作区代理的工作原理吗?什么是正确的配置,以便我可以从Shell发出请求(请参阅下文)?

我的Geoserver在docker容器中运行,并且正在端口12018上的主机中进行侦听。通过网络浏览器可以正常访问所有内容。

以下URL请求可在浏览器上使用:

http://localhost:12018/geoserver/geonode/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=my_data_name35&maxFeatures=50&outputFormat=application%2Fjson

将typeName用作geonode:my_data_name35也可以:

http://localhost:12018/geoserver/geonode/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=geonode%3Amy_data_name35&maxFeatures=50&outputFormat=application%2Fjson

但是从cURL,第一个请求返回:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
   <ServiceException code="InvalidParameterValue" locator="typeName">
      Feature type :my_data_name35 unknown
</ServiceException></ServiceExceptionReport>

同样也是从cURL,第二个请求返回:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
   <ServiceException code="InvalidParameterValue" locator="typeName">
      Feature type geonode:my_data_name35 unknown
</ServiceException></ServiceExceptionReport>

感谢您的帮助。谢谢!

proxy geoserver
1个回答
1
投票

我发现了问题,实际上很基本。

请求的资源需要身份验证,浏览器在其中传递cookie。

使用cURL,还需要通过身份验证。

它不返回禁止,也许是因为某些资源不需要身份验证。

很抱歉听到声音。

© www.soinside.com 2019 - 2024. All rights reserved.