Skip to content

CORS Headers bug? #2095

Answered by vytas7
Clement-O asked this question in Q&A
Aug 15, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @Clement-O!
I believe the framework is functioning as expected, at least from what I can see.
It is not a bug per se, but a usability bug, which is already tracked as #1977. I have rescheduled it for the upcoming 4.0 release since you're not the first one to get hit by this. (You are also welcome to contribute by tackling this one 🙂 )

Having tweaked your test slightly, it seems to pass as expected:

from falcon import asgi
from falcon import testing
from falcon.middleware import CORSMiddleware


class DummyResource:
    async def on_post(self, req, resp):
        resp.media = {'msg': 'test'}

    async def on_get(self, req, resp):
        resp.media = {'msg': 'test'}


class BaseFalconTest

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Clement-O
Comment options

Answer selected by Clement-O
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants