const CorsLive = Layer.unwrapEffect(
EnvVars.pipe(
Effect.map((envVars) =>
HttpApiBuilder.middlewareCors({
allowedOrigins: [envVars.APP_URL],
allowedMethods: ["GET", "POST", "PUT", "DELETE", "PATCH"],
allowedHeaders: ["Content-Type", "Authorization", "B3", "traceparent"],
credentials: true,
}),
),
),
);
const CorsLive = Layer.unwrapEffect(
EnvVars.pipe(
Effect.map((envVars) =>
HttpApiBuilder.middlewareCors({
allowedOrigins: [envVars.APP_URL],
allowedMethods: ["GET", "POST", "PUT", "DELETE", "PATCH"],
allowedHeaders: ["Content-Type", "Authorization", "B3", "traceparent"],
credentials: true,
}),
),
),
);