Skip to content

Commit

Permalink
fix(server): Do not send X-Forwarded-* headers via proxy
Browse files Browse the repository at this point in the history
resolves #4635
  • Loading branch information
jmacura committed Jan 31, 2024
1 parent b8a2e16 commit 78411fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/hslayers-server/src/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const cors_proxy = cors_anywhere.createServer({
secureOptions: 1 << 2,
},
},
// Remove X-Forwarded-* headers since some map servers (ArcGIS) use it to generate URLs in capabilities and 'xfwd' option does not guarantee that
removeHeaders: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-site', 'x-forwarder-server']
});
const GEONAMES_APIKEY = process.env.HS_GEONAMES_API_KEY || 'hslayersng';

Expand Down

0 comments on commit 78411fb

Please sign in to comment.