Skip to content

@cloudflare/vite-plugin does not deliver OPTIONS method requests to worker when running via vite dev server #9091

Closed
@aroman

Description

@aroman

Which Cloudflare product(s) does this pertain to?

Vite Plugin

What versions & operating system are you using?

4.10.0

Please provide a link to a minimal reproduction

No response

Describe the Bug

my worker sets CORS preflight headers, but these are not respected by vite - I needed to configure server.cors options to my vite.config.ts to get this to work.

It seems like vite is intercepting OPTIONS requests rather than delivering them to the worker, so the worker isn't able to respond to them

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't workingvite-pluginRelating to the `@cloudflare/vite-plugin` package

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions