Skip to content

Commit

Permalink
Merge pull request #100 from IGNF/maj_module_gpu
Browse files Browse the repository at this point in the history
Changement url Gpu pour geoplateforme
  • Loading branch information
vinsag authored Mar 1, 2024
2 parents b3f77af + 926309b commit 0548e34
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 208 deletions.
111 changes: 0 additions & 111 deletions lib/ClientGpu.js

This file was deleted.

90 changes: 0 additions & 90 deletions lib/buildGpuFilter.js

This file was deleted.

2 changes: 1 addition & 1 deletion middlewares/gppWfsClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function(req, res, next) {
if ( req.headers.referer ){
options.headers.Referer = req.headers.referer ;
}
if ( process.env.GEOPORTAL_REFERER /*&& ! hasUserKey*/ ){
if ( process.env.GEOPORTAL_REFERER ){
options.headers.Referer = process.env.GEOPORTAL_REFERER ;
}

Expand Down
11 changes: 5 additions & 6 deletions middlewares/gpuWfsClient.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const GeoportalWfsClientGpu = require('../lib/ClientGpu.js');

const GeoportalWfsClient = require('geoportal-wfs-client');
/*
* middleware pour la création du client geoportail
*/
Expand All @@ -11,13 +10,13 @@ module.exports = function(req, res, next) {
referer = req.headers.referer ;
}

req.gpuWfsClient = new GeoportalWfsClientGpu({
'apiKey': '39wtxmgtn23okfbbs1al2lz3',
'url' : 'https://wxs-gpu.mongeoportail.ign.fr/externe/{apiKey}/wfs/v',
req.gpuWfsClient = new GeoportalWfsClient({
'defaultGeomFieldName': 'the_geom',
url: 'https://data.geopf.fr/wfs/ows',
'headers':{
Referer: referer,
'User-Agent': 'apicarto'
}
});
next();
};
};

0 comments on commit 0548e34

Please sign in to comment.