Skip to content

Problem when local fetching with SvelteKit while in dev #132

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 .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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