Website: uncomment warning related to missing Cloudflare headers (#36295)
Changes: - Uncommented a warning that is logged if certain Cloudflare headers are missing. (Reverted the changes from https://github.com/fleetdm/fleet/pull/35909)
This commit is contained in:
@@ -59,10 +59,9 @@ module.exports = {
|
||||
// Due to shipping costs, we'll check the requesting user's cf-ipcountry to see if they're in the US, and their cf-iplongitude header to see if they're in the contiguous US.
|
||||
if(sails.config.environment === 'production') {
|
||||
// Log a warning if the cloudflare headers we use are missing in production.
|
||||
// 2025-11-18: This warning was temporarily disabled until the website is back on Cloudflare.
|
||||
// if(!this.req.get('cf-ipcountry') || !this.req.get('cf-iplongitude')) {
|
||||
// sails.log.warn('When a user visted the docs, the Cloudflare header we use to determine if they are visiting from the contiguous United States is missing.');
|
||||
// }
|
||||
if(!this.req.get('cf-ipcountry') || !this.req.get('cf-iplongitude')) {
|
||||
sails.log.warn('When a user visted the docs, the Cloudflare header we use to determine if they are visiting from the contiguous United States is missing.');
|
||||
}
|
||||
}
|
||||
if(this.req.get('cf-ipcountry') === 'US' && this.req.get('cf-iplongitude') > -125) {
|
||||
showSwagForm = true;
|
||||
|
||||
Reference in New Issue
Block a user