Skip to content

Message Batches API CORS misconfiguration #930

@Randomblock1

Description

@Randomblock1

Most API endpoints I've tried have browser/CORS support enabled when headers set via dangerouslyAllowBrowser: true, but it appears the Message Batches endpoint does not. I tried making a request and it gave me a CORS error. I ran the same request via copying as curl and it succeeded. I then made a request in the browser to the messages and models API, and both worked, so this appears to be an issue specific to the message batches API.

Access to fetch at 'https://api.anthropic.com/v1/messages/batches' from origin 'http://localhost:5174' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I don't see any documentation about this, so I think it's a misconfiguration on the /v1/messages/batches endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssues pertaining to the underlying Anthropic API (not the SDK)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions