Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions website/api/controllers/docs/view-basic-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions website/api/controllers/view-device-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions website/api/controllers/view-transparency.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading