(countryAccess: FreeModeCountryAccess)
| 76 | } |
| 77 | |
| 78 | function hardBlockedResponse(countryAccess: FreeModeCountryAccess) { |
| 79 | return NextResponse.json( |
| 80 | { |
| 81 | status: 'country_blocked', |
| 82 | message: formatFreebuffHardBlockedMessage( |
| 83 | countryAccess.ipPrivacy?.signals, |
| 84 | ), |
| 85 | countryCode: countryAccess.countryCode ?? 'UNKNOWN', |
| 86 | countryBlockReason: countryAccess.blockReason ?? undefined, |
| 87 | ipPrivacySignals: countryAccess.ipPrivacy?.signals ?? undefined, |
| 88 | }, |
| 89 | { status: 403 }, |
| 90 | ) |
| 91 | } |
| 92 | |
| 93 | function logCountryAccess( |
| 94 | route: 'GET' | 'POST', |
no test coverage detected