Opened 3 years ago
Closed 3 years ago
#33244 closed Bug (needsinfo)
Why cross-domain access, cors reports an error, the request can still enter the view to process the view logic
Reported by: | mncmhs | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 3.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Attachments (1)
Change History (2)
by , 3 years ago
Attachment: | NDVU3G9(Y]GSO[@~8_S@UFC.png added |
---|
comment:1 by , 3 years ago
Component: | Uncategorized → HTTP handling |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Summary: | Why cross-domain access, cors reports an error, the request can still enter the view to process the view logic Django 3.2.8 → Why cross-domain access, cors reports an error, the request can still enter the view to process the view logic |
Type: | New feature → Bug |
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.