Closed Bug 1511942 Opened 5 years ago Closed 5 years ago

DevTools: network tab should mark requests blocked by missing CORS header

Categories

(DevTools :: Netmonitor, defect)

63 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1157817

People

(Reporter: christian, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

1. Goto www.test-cors.org/#?server_enable=false&server_tabs=local
2. Open DevTools
3. Select network tab
4. Click [Send Request]



Actual results:

Network tab shows a successful request, status 200.

Console shows this warning:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://server.test-cors.org/server?id=2047290&enable=false&status=200&credentials=false. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).


Expected results:

The new request should have some marker indicating that the request was blocked.

Here's why:
I had a situation where my JavaScript raised a network error but the network tab showed all green. That lead me to think that my error handling was wrongly triggered. A colleague had the idea that it might be a CORS issue. To verify that, I had to look at console warnings. Warnings are usually not displayed because minified code often shows a lot of those, drowning out the important errors. Therefore, I hadn't seen anything in the console.
Component: Untriaged → Netmonitor
Product: Firefox → DevTools
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.