mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Restrict x-umami-client-* headers to cloud mode only.
This commit is contained in:
parent
fbd0564133
commit
fd2e2047cd
2 changed files with 11 additions and 7 deletions
|
|
@ -10,12 +10,16 @@ import { safeDecodeURIComponent } from '@/lib/url';
|
|||
const MAXMIND = 'maxmind';
|
||||
|
||||
const PROVIDER_HEADERS = [
|
||||
// Umami custom headers
|
||||
{
|
||||
countryHeader: 'x-umami-client-country',
|
||||
regionHeader: 'x-umami-client-region',
|
||||
cityHeader: 'x-umami-client-city',
|
||||
},
|
||||
// Umami custom headers (cloud mode only)
|
||||
...(process.env.CLOUD_MODE
|
||||
? [
|
||||
{
|
||||
countryHeader: 'x-umami-client-country',
|
||||
regionHeader: 'x-umami-client-region',
|
||||
cityHeader: 'x-umami-client-city',
|
||||
},
|
||||
]
|
||||
: []),
|
||||
// Cloudflare headers
|
||||
{
|
||||
countryHeader: 'cf-ipcountry',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue