Sanity Library Reference Docs
    Preparing search index...

    Interface BlueprintCorsOriginResourceBeta

    Represents a CORS Origin resource.

    https://www.sanity.io/docs/content-lake/cors This feature is subject to breaking changes.

    interface BlueprintCorsOriginResource {
        allowCredentials?: boolean;
        name: string;
        origin: string;
        project?: string;
        type: "sanity.project.cors";
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowCredentials?: boolean

    When adding a CORS origin, you will also need to decide whether or not to allow credentials. If you allow credentials, the origin will be allowed to send authenticated requests using the token or session of a logged in user.

    If this origin hosts a studio, you will need to allow credentials. Otherwise, you should probably select not to allow credentials.

    Allowing credentials from wildcard origins is dangerous. Any domain that matches the given pattern will be able to send requests on the user's behalf if they are logged in to your studio.

    name: string
    origin: string

    A CORS origin will be defined using the following format: protocol://hostname[:port]

    The protocol and host name are required while the port is optional. Wildcards (*) are allowed.

    project?: string

    The project ID of the project that contains your CORS Origin.

    The project attribute must be defined if your blueprint is scoped to an organization.

    type: "sanity.project.cors"