Closed Bug 1677379 Opened 4 years ago Closed 3 years ago

"Learn more" link for specific CORS error is a 404 (CORSMissingAllowHeaderFromPreflight)

Categories

(DevTools :: Console, defect, P3)

Firefox 81
defect

Tracking

(firefox85 fixed)

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: miriam, Assigned: nchevobbe)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Send a POST request to a server at a different domain that doesn't set the "Access-Control-Allow-Headers" header and specify a header.

Actual results:

The correct error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://chess-api.polytopia.win/accounts/login. (Reason: header ‘content-type’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).
With a [Learn More] link pointing to the following URL:
https://developer.mozilla.org/docs/Web/HTTP/CORS/Errors/CORSMissingAllowHeaderFromPreflight2
Which 404s.

Expected results:

Learn more link should not 404. Perhaps it was meant to be

https://developer.mozilla.org/docs/Web/HTTP/CORS/Errors/CORSMissingAllowHeaderFromPreflight

Sorry for the bad markup I'm new to this forum.

Summary: "Learn more" link for specific CORS error 404s. → "Learn more" link for specific CORS error is a 404 (CORSMissingAllowHeaderFromPreflight)

Thanks for the report! I was able to reproduce and I have a fix for this.

Severity: -- → S3
Priority: -- → P3

I think this came with Bug 1575068

Regressed by: 1575068
Has Regression Range: --- → yes
Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

In Bug 1575068, the message of CORSMissingAllowHeaderFromPreflight and CORSPreflightDidNotSucceed
changed, and the category field was updated in the nsIErrorMessage. As a result, the keys in
errordocs.js needed to be changed, which was rightfully done, but the value was changed as well,
which means the resulting url of the Learn more links were modified as well. I'm not sure if
something changed since then, but those 2 urls now lead to 404 pages on MDN.
This patch fixes those URLs to ensure we do link to the right MDN pages.

Attachment #9187988 - Attachment description: Bug 1677379 - [devtools] Fix Learn more link on CORS warning message. ckerschb. → Bug 1677379 - [devtools] Fix Learn more link on CORS warning message. r=ckerschb.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3c200b6e7fee
[devtools] Fix Learn more link on CORS warning message. r=ckerschb.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: