MCPcopy
hub / github.com/CodebuffAI/codebuff / hardBlockedResponse

Function hardBlockedResponse

web/src/app/api/v1/freebuff/session/_handlers.ts:78–91  ·  view source on GitHub ↗
(countryAccess: FreeModeCountryAccess)

Source from the content-addressed store, hash-verified

76}
77
78function 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
93function logCountryAccess(
94 route: 'GET' | 'POST',

Callers 2

postFreebuffSessionFunction · 0.85
getFreebuffSessionFunction · 0.85

Calls 1

Tested by

no test coverage detected