Skip to content

CORS #2564

Answered by bashmish
quentinmazoua asked this question in Ideas
CORS #2564
Nov 20, 2023 · 1 comment
Discussion options

You must be logged in to vote

I figured you are referring to https://github.com/open-wc/es-dev-server/blob/98dd47464c97c5ab5fc6ef86723b3f529bc8265c/src/config.ts#L60

Not sure why this feature is not supported natively here, but given it was in the project which WDS was forked from (and is written by same authors), I assume it was removed on purpose. Maybe @LarsDenBakker can add more details?

But don't worry, it's very easy to add it yourself, I'd say so easy that you might not need it out-of-the-box.

Just install and use the import koaCors from '@koa/cors'; and add it to middleware which is an array of Koa middlewares
https://modern-web.dev/docs/dev-server/middleware/#dev-server-middleware
similar to
https://github.co…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by quentinmazoua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants