Skip to content

Fetch: test Cross-Origin-Resource-Policy: same-site's scheme restriction#11428

Merged
annevk merged 1 commit into
masterfrom
annevk/corp-scheme-restriction
Jun 18, 2018
Merged

Fetch: test Cross-Origin-Resource-Policy: same-site's scheme restriction#11428
annevk merged 1 commit into
masterfrom
annevk/corp-scheme-restriction

Conversation

@annevk

@annevk annevk commented Jun 8, 2018

Copy link
Copy Markdown
Member

Supplements #11171.

For whatwg/fetch#733.

annevk added a commit to whatwg/fetch that referenced this pull request Jun 8, 2018
This header makes it easier for sites to block unwanted "no-cors"
cross-origin requests.

Tests:

* web-platform-tests/wpt#11171
* web-platform-tests/wpt#11427
* web-platform-tests/wpt#11428

Follow-up: #760.

Fixes #687.
@annevk annevk force-pushed the annevk/corp-scheme-restriction branch from 3403f42 to cd37c77 Compare June 18, 2018 09:45

@mikewest mikewest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nit.

return promise_rejects(t,
new TypeError(),
fetch(get_host_info().HTTPS_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/hello.py?corp=same-site", { mode: "no-cors" }));
}, "Cross-Origin-Resource-Policy: same-site's scheme restriction");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Perhaps name the test "same-site will block an HTTPS resource's inclusion into an HTTP document." for clarity?

@annevk annevk force-pushed the annevk/corp-scheme-restriction branch from d3d8a27 to b8b37d4 Compare June 18, 2018 13:00
@annevk annevk merged commit 7f0a106 into master Jun 18, 2018
@annevk annevk deleted the annevk/corp-scheme-restriction branch June 18, 2018 13:13
annevk added a commit to whatwg/fetch that referenced this pull request Jun 18, 2018
This header makes it easier for sites to block unwanted "no-cors"
cross-origin requests.

Tests:

* web-platform-tests/wpt#11171
* web-platform-tests/wpt#11427
* web-platform-tests/wpt#11428

Follow-up: #760 & #767.

Fixes #687.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants