diff --git a/src/routes/api/contact.ts b/src/routes/api/contact.ts index b9eafee..a479d70 100644 --- a/src/routes/api/contact.ts +++ b/src/routes/api/contact.ts @@ -19,7 +19,7 @@ const ContactFormBodySchema = z.object({ * CORS 헤더 생성 */ function getCorsHeaders(env: Env): Record { - const allowedOrigin = env.HOSTING_SITE_URL || 'https://hosting.anvil.it.com'; + const allowedOrigin = env.HOSTING_SITE_URL || 'https://hosting.inouter.com'; return { 'Access-Control-Allow-Origin': allowedOrigin, 'Access-Control-Allow-Methods': 'POST, OPTIONS', @@ -37,7 +37,7 @@ function getCorsHeaders(env: Env): Record { async function handleContactForm(request: Request, env: Env): Promise { // CORS 헤더 생성 const corsHeaders = getCorsHeaders(env); - const allowedOrigin = env.HOSTING_SITE_URL || 'https://hosting.anvil.it.com'; + const allowedOrigin = env.HOSTING_SITE_URL || 'https://hosting.inouter.com'; // Origin 헤더 검증 (curl 우회 방지) const origin = request.headers.get('Origin'); @@ -119,7 +119,7 @@ export const contactRouter = new Hono<{ Bindings: Env }>(); // CORS middleware for /contact endpoint contactRouter.use('/*', cors({ origin: (origin, c) => { - const allowedOrigin = c.env.HOSTING_SITE_URL || 'https://hosting.anvil.it.com'; + const allowedOrigin = c.env.HOSTING_SITE_URL || 'https://hosting.inouter.com'; return origin === allowedOrigin ? origin : null; }, allowMethods: ['POST', 'OPTIONS'],