Skip to content

Commit 70d516c

Browse files
authored
Merge pull request #11071 from nanaya/ignore-t1
Don't report missing country for non-country code
2 parents 0aa68ac + d93b06c commit 70d516c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/Http/Controllers/UsersController.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -1003,12 +1003,13 @@ private function storeUser(array $rawParams)
10031003

10041004
$user = $registration->user();
10051005

1006-
if ($country === null) {
1006+
// report unknown country code but ignore non-country from cloudflare
1007+
if ($countryCode !== null && $country === null && $countryCode !== 'T1') {
10071008
app('sentry')->getClient()->captureMessage(
1008-
'User registered from unknown country: '.$countryCode,
1009+
'User registered from unknown country',
10091010
null,
10101011
(new Scope())
1011-
->setExtra('country', $countryCode)
1012+
->setTag('country', $countryCode)
10121013
->setExtra('ip', $ip)
10131014
->setExtra('user_id', $user->getKey())
10141015
);

0 commit comments

Comments
 (0)