[Django] #33244: Why cross-domain access, cors reports an error, the request can still enter the view to process the view logic Django 3.2.8

15 views
Skip to first unread message

Django

unread,
Oct 30, 2021, 5:20:19 AM10/30/21
to django-...@googlegroups.com
#33244: Why cross-domain access, cors reports an error, the request can still enter
the view to process the view logic Django 3.2.8
-----------------------------------------+------------------------
Reporter: mncmhs | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The browser displays cors error, but the corresponding view is still
executed
Why not return 404 directly after cors verification fails, and execute the
view corresponding to the route?

Response headers
HTTP/1.1 200 OK
Date: Sat, 30 Oct 2021 08:47:15 GMT
Server: WSGIServer/0.2 CPython/3.7.1
Content-Type: application/json
X-Frame-Options: DENY
Content-Length: 14
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin

Request headers
GET /upload/ HTTP/1.1
Host: 192.168.2.188:8001
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Accept: */*
Origin: http://192.168.0.205:3000
Referer: http://192.168.0.205:3000/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9

--
Ticket URL: <https://code.djangoproject.com/ticket/33244>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 30, 2021, 5:23:56 AM10/30/21
to django-...@googlegroups.com
#33244: Why cross-domain access, cors reports an error, the request can still enter
the view to process the view logic Django 3.2.8
-------------------------------+--------------------------------------

Reporter: mncmhs | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by mncmhs):

* Attachment "NDVU3G9(Y]GSO[@~8...@UFC.png" added.

Django

unread,
Oct 30, 2021, 7:02:21 AM10/30/21
to django-...@googlegroups.com
#33244: Why cross-domain access, cors reports an error, the request can still enter
the view to process the view logic
-------------------------------+--------------------------------------
Reporter: mncmhs | Owner: nobody
Type: Bug | Status: closed
Component: HTTP handling | Version: 3.2
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => needsinfo
* type: New feature => Bug
* component: Uncategorized => HTTP handling


Comment:

Hi, I don't think you've explained the issue in enough detail to confirm a
bug in Django. Please reopen the ticket if you can debug your issue and
provide details about why and where Django is at fault. If you're having
trouble understanding how Django works, see
TicketClosingReasons/UseSupportChannels for ways to get help.

--
Ticket URL: <https://code.djangoproject.com/ticket/33244#comment:1>

Reply all
Reply to author
Forward
0 new messages