Code Monkey home page Code Monkey logo

Comments (11)

adamchainz avatar adamchainz commented on August 19, 2024 1

Origin is sent by your browser on cross-origin requests only: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin .

from django-cors-headers.

bhaugen avatar bhaugen commented on August 19, 2024

I have this problem when I am running locally using runserver (the django dev server).

Same fix worked.

What's the prognosis for an "official" fix? I'd rather stick with what seems to be the main source. Pip install and all.

from django-cors-headers.

bhaugen avatar bhaugen commented on August 19, 2024

P.S. this issue only affects the local django dev server. Works fine on Apache without the fix. So I'm not inclined to fork it.

from django-cors-headers.

angry-elf avatar angry-elf commented on August 19, 2024

@bhaugen What version of apache you use? I have apache 2.2.31 and there are no "Origin" header there. From where it come from?

from django-cors-headers.

bhaugen avatar bhaugen commented on August 19, 2024

@angry-elf - we deploy on Webfaction. Apache 2.something. I have no server fu, which is why we deploy on Webfaction. So I can't explain very much here. Sorry to disappoint. Maybe somebody else can come along and enlighten both of us.

from django-cors-headers.

angry-elf avatar angry-elf commented on August 19, 2024

@bhaugen
just realized, i need cors headers at other side of requests, so i don't need it in my application at all :)

from django-cors-headers.

bhaugen avatar bhaugen commented on August 19, 2024

I think that's right. I just needed
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
for selected URLs.

Which is what django-cors-headers supplies.

from django-cors-headers.

adamchainz avatar adamchainz commented on August 19, 2024

Sounds like this issue was fixed.

from django-cors-headers.

 avatar commented on August 19, 2024

Hi,
in the current release,
on process_response function in corsheaders/middleware.py
origin = request.META.get('HTTP_ORIGIN') is always empty, so
response["Access-Control-Allow-Origin"] is impossibile to set.

Just to be sure, it's correct because I'm in development mode?

Thanks
Pietro

from django-cors-headers.

 avatar commented on August 19, 2024

Thank you ...
Clearly, I need to sleep ...

from django-cors-headers.

andrscyv avatar andrscyv commented on August 19, 2024

Hi!
I have this problem on Django 2.2.3 while running both the back end and the front end in localhost, si there any workaround to make it work ?

from django-cors-headers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.