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 Feb 5, 2024
1 parent a8fc35c commit aaa4782
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 aaa4782

Please sign in to comment.