Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/web/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ function stripURLForReferrer (url, originOnly) {
// 1. Assert: url is a URL.
assert(url instanceof URL)

url = new URL(url)

// 2. If url’s scheme is a local scheme, then return no referrer.
if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {
return 'no-referrer'
Expand Down
4 changes: 1 addition & 3 deletions test/wpt/status/fetch.status.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@
"skip": true
},
"request-referrer.any.js": {
"note": "TODO(@KhafraDev): url referrer test could probably be fixed",
"fail": [
"about:client referrer",
"url referrer"
"about:client referrer"
]
},
"request-upload.any.js": {
Expand Down