#pg_featureserv
pg_featureserv - Veröffentlichung von Vektordaten mit OGC API Features has been released on YouTube https://www.youtube.com/watch?v=EX1JrRdGi0Q
March 24, 2024 at 11:59 AM
pg_featureserv - Veröffentlichung von Vektordaten mit OGC API Features has been released on media.ccc.de https://media.ccc.de/v/fossgis2024-38343-pgfeatureserv-verffentlichung-von-vektordaten-mit-ogc-api-features
March 20, 2024 at 4:10 PM
Restrict access to data delivered by pg_featureserv
I wan't to use the pg_featureserv service to deliver data from a PostgreSQL/PostGIS database to be displayed in Openlayers. The displayed maps are for internal use only, so the maps are only accessible when users are logged in. Actually anybody calling the url of the pg_featureserv service directly http://map.mydomain.com:9000/collections/schema.areas/items.json has access to the data. I wan't to restrict this, so that only the map-pages from the server (the same where the PostgreSQL/PostGIS and the pg_featureserv are runing on) have access to the data. But when I change the HttpHost settings to 127.0.0.1 or to the IP adress of our server, the data isn't displayed anymore in the Openlayers map. The pg_featureserv.toml looks like this: [Server] # Accept connections on this subnet (default accepts on all) # HttpHost = "0.0.0.0" # HttpHost = "127.0.0.1" HttpPort = 9000 UrlBase = "127.0.0.1:9000" The requested data is displayed fine inside the Openlayers map. var areas = new ol.layer.Vector({ source: new ol.source.Vector({ url: "http://map.mydomain.com:9000/collections/schema.areas/items", format: new ol.format.GeoJSON() }) }); var map = new ol.Map({ target: 'map', layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }),areas ], view: new ol.View({ center: ol.proj.fromLonLat([6.2, 49.6]), zoom: 12 }) });
gis.stackexchange.com
December 11, 2025 at 9:34 PM