MCPcopy Index your code
hub / github.com/simstudioai/sim / makeRequest

Function makeRequest

apps/sim/proxy.test.ts:14–21  ·  view source on GitHub ↗
(pathname: string, origin?: string)

Source from the content-addressed store, hash-verified

12import { resolveApiCorsPolicy } from '@/proxy'
13
14function makeRequest(pathname: string, origin?: string): NextRequest {
15 return {
16 nextUrl: { pathname },
17 headers: {
18 get: (name: string) => (name.toLowerCase() === 'origin' ? (origin ?? null) : null),
19 },
20 } as unknown as NextRequest
21}
22
23describe('resolveApiCorsPolicy', () => {
24 it('serves OAuth2 routes with wildcard origin and no credentials', () => {

Callers 1

proxy.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected