Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: How to enable SSL/https for WFS3 HTML View #189

Open
justb4 opened this issue Sep 7, 2021 · 2 comments
Open

Q: How to enable SSL/https for WFS3 HTML View #189

justb4 opened this issue Sep 7, 2021 · 2 comments

Comments

@justb4
Copy link

justb4 commented Sep 7, 2021

Could not find in the QGIS Server documentation. May apply also to WMS, WFS, WMTS.
Our QGIS Desktop version is 3.16.0-Hannover | QGIS code revision | 4af1cbfb97

Our QGIS Server instance runs behind Traefik using https://.

GeoJSON Features are returned ok.
But as HTML internal requests requests are using http://. For example:
https://apitestbed.geonovum.nl/qgis/wfs3/collections/dutch_addresses_4326%20OGRGeoJSON/items.html?
The map remains empty and in the browser Console we see this error:

jquery-3.4.1.min.js:2 Mixed Content: The page at 'https://apitestbed.geonovum.nl/qgis/wfs3/collections/dutch_addresses_4326%20OGRGeoJSON/items.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://apitestbed.geonovum.nl/qgis/wfs3/collections/dutch_addresses_4326%20OGRGeoJSON/items.geojson?'. This request has been blocked; the content must be served over HTTPS.
send @ jquery-3.4.1.min.js:2

There may be a setting or so, but can't find. The QGIS Server service is defined in GitHub:
https://github.com/Geonovum/ogc-api-testbed/tree/main/services/qgis . The Docker Image we use is:
camptocamp/qgis-server latest 7fb64088c423 14 months ago 1.35GB.

Ok very old...I tried newer Docker Image versions like master and 3.16 but then got other errors like on the landing page:
https://apitestbed.geonovum.nl/qgis/wfs3/

[
  {
    "code": "Bad request error",
    "description": "Template not found: getLandingPage.html"
  }
]
@swiss-knight
Copy link

I'm experiencing a similar issue; the GeoJSON feature seems transferred using HTTP instead of HTTPS when browsing this particular URL: https://my-server.ch/wfs3/collections/collection1/items/1.html

It shows "Mixed Block" in the Network panel under "Transferred" and the mini Leaflet map is center on Null Island with no feature displayed.

But, always in the network panel, if I right click the GeoJSON feature which wasn't transferred > "Open in new tab", then I opens correctly using HTTPS: https://my-server.ch/wfs3/collections/collection1/items/1.geojson

I am using the latest image at the time of writing: "camptocamp/qgis-server:3.22"

@sbrunner
Copy link
Member

We use a frontend for that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants