Skip to content

Problem when local fetching with SvelteKit while in dev #132

@mielsense

Description

@mielsense

Hey !
While testing logging for sveltekit (dev not production), everything works well when i call a log from the server side, however client side i get a cors error :

Access to fetch at {better-stack-url} from origin 'http://localhost:5173' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

SvelteKit has no control over that point as this header is added by the vite server (all of my other request work) so i think the issue might come from the backend ?
And with the use of the sdk i can't force it to override since i do not control the requests .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions