Skip to content

Add CORS-middleware #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

cheif
Copy link

@cheif cheif commented Sep 28, 2015

As discussed in: #287

@pySilver
Copy link

pySilver commented Oct 8, 2015

why not simply use django-cors-headers ?

@cheif
Copy link
Author

cheif commented Oct 8, 2015

django-cors-headers has no way of determining headers dynamically, this PR aims to solve that. There's more info in the issue I just linked in the PR (forgot that earlier unfortunately)

@poswald
Copy link
Collaborator

poswald commented Mar 21, 2016

This branch needs updating with develop, a quick mention in the documentation, and an up/down vote on merging it. One question I had was if this replaces django-cors-headers or if it just supplements it's behavior? i.e. would you run both at the same time or not?

It seems others have need for it, it's optional, tested, and as long as it is a sane implementation it seems ok to add.

@cheif cheif force-pushed the cors-header-middleware branch from 7922bb6 to 24ee096 Compare March 22, 2016 13:06
@cheif
Copy link
Author

cheif commented Mar 22, 2016

Now it's synced with evonove:master (Didn't find any develop?) and I've added some documentation, I only added to the tutorial (where all django-cors-headers references were removed).
Reg. django-cors-headers, you should be able to ditch it completely. This just uses the redirect uris right away to determine if a request is ok, with django-cors-headers you'll have to add all domains manually.

Does that make sense? (We've been using this approach in prod for several months, since the PR was opened)

@Dean-Christian-Armada
Copy link

It seems that the changes has not yet been put when using pip,, I also checked my oauth2_provider.middleware whch was download just last week and it has no "CorsMiddleware" class in it

@jleclanche jleclanche force-pushed the master branch 4 times, most recently from 80a3973 to f59509f Compare March 14, 2017 22:06
@jleclanche
Copy link
Collaborator

Closing PR which at this point is too old to review/merge. If there's interest to revive it please rediscuss in #287.

@rcmurphy
Copy link
Contributor

rcmurphy commented May 4, 2022

Why was this PR killed? This seems to be novel functionality apart from that offered by django-cors-headers. To allow external clients to hit our API I'm going to have to reimplement this code downstream to replicate the functionality; IMO this is very useful.

@n2ygk
Copy link
Contributor

n2ygk commented May 4, 2022

@rcmurphy Like it says, because it's too old to review/merge. Feel free to submit a new PR.

@rcmurphy
Copy link
Contributor

rcmurphy commented May 4, 2022

Awesome! Will do.

@rcmurphy rcmurphy mentioned this pull request May 4, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants