feat: ignore secret or cors for client
This commit is contained in:
@@ -104,6 +104,10 @@ export async function validateSdkRequest(
|
|||||||
throw createError('Ingestion: Profile id is blocked by project filter');
|
throw createError('Ingestion: Profile id is blocked by project filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client.ignoreCorsAndSecret) {
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
|
||||||
if (client.project.cors) {
|
if (client.project.cors) {
|
||||||
const domainAllowed = client.project.cors.find((domain) => {
|
const domainAllowed = client.project.cors.find((domain) => {
|
||||||
const cleanedDomain = cleanDomain(domain);
|
const cleanedDomain = cleanDomain(domain);
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "public"."clients" ADD COLUMN "ignoreCorsAndSecret" BOOLEAN NOT NULL DEFAULT false;
|
||||||
@@ -250,6 +250,8 @@ model Client {
|
|||||||
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
||||||
organizationId String
|
organizationId String
|
||||||
|
|
||||||
|
ignoreCorsAndSecret Boolean @default(false)
|
||||||
|
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user