From 7ea2183688a3b0bccb2d3e42bea72b71e214be30 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 18 Nov 2025 10:36:22 -0600 Subject: [PATCH] Website: disable warning related to missing Cloudflare headers (#35909) Changes: - Commented out a warning that is logged if Cloudflare headers are missing --- website/api/controllers/docs/view-basic-documentation.js | 7 ++++--- website/api/controllers/view-device-management.js | 7 ++++--- website/api/controllers/view-transparency.js | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/website/api/controllers/docs/view-basic-documentation.js b/website/api/controllers/docs/view-basic-documentation.js index 74dbc15ce5..e2357bdc9d 100644 --- a/website/api/controllers/docs/view-basic-documentation.js +++ b/website/api/controllers/docs/view-basic-documentation.js @@ -59,9 +59,10 @@ 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. - 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.'); - } + // 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') === 'US' && this.req.get('cf-iplongitude') > -125) { showSwagForm = true; diff --git a/website/api/controllers/view-device-management.js b/website/api/controllers/view-device-management.js index 33e8cbfcd7..d1258a55ad 100644 --- a/website/api/controllers/view-device-management.js +++ b/website/api/controllers/view-device-management.js @@ -61,9 +61,10 @@ 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. - if(!this.req.get('cf-ipcountry') || !this.req.get('cf-iplongitude')) { - sails.log.warn('When a user visted the device management page, the Cloudflare header we use to determine if they are visiting from the contiguous United States is missing.'); - } + // 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 device management page, 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; diff --git a/website/api/controllers/view-transparency.js b/website/api/controllers/view-transparency.js index 2796f4634e..a850e0e077 100644 --- a/website/api/controllers/view-transparency.js +++ b/website/api/controllers/view-transparency.js @@ -21,9 +21,10 @@ 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. - if(!this.req.get('cf-ipcountry') || !this.req.get('cf-iplongitude')) { - sails.log.warn('When a user visted the transparency page, the Cloudflare header we use to determine if they are visiting from the contiguous United States is missing.'); - } + // 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 transparency page, 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;