-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prerender
subresources and CSP
#284
Comments
Prerender
subresources and CSPprerender
subresources and CSP
FWIW, I don't agree with prerender being sufficiently captured by navigation-to. Navigation is end user visible, prerender is not. Therefore prerender should be governed by connect-src/default-src or some such. Once prerender is allowed, it seems reasonable to use the CSP of the prerendered document, assuming it only works for same-origin resources. |
I could live with that. That said, I wonder if it would be better to make
This seems right to me.
I'm pretty sure prerendering is meant to work cross-origin. Your favourite search engine is pretty sure you're going to visit the first link, so it ask the browser to warm things up, for example. |
I guess it's fine either way, if you trust that other origin with the user's data it's already too late if they turn out to be evil. |
I see the difference between
Yup, third party prerendering is a major use-case. |
@yoavweiss: Is "prefetch" a reasonable way of talking about the various generic pre-things noted above? Should we wrap all of them up into it? |
SGTM |
Ok. Then I'll adjust the patch to talk about more things. We'll have to add a hook to Fetch and CSP directives for |
Oh, I wasn't talking about preconnect and dns-prefetch... For preconnect and dns-prefetch, I'm not sure. |
Ok.
That seems like overkill. They seem to slot pretty well either into "go connect to this thing" (e.g.
I guess this makes some kind of sense, but I am not enthusiastic about doing this as it's more work and less clear. For example, |
OK, so @mikewest and myself discussed it and reached the following conclusions:
Mike - does that properly capture your understanding of our discussion? |
Yeah, see also #282 which summarizes that discussion too. 😊 |
Some bypasses that could be mitigated: |
In #107 we discussed CSP in relation to
prefetch
.As part of the comments there, @mikewest said
which makes sense.
But, that doesn't cover the subresource loads that prerender then triggers.
Two options I can think of:
prefetch-src
I think 1) is easier from a developer's perspective, but want to see what other folks think.
The text was updated successfully, but these errors were encountered: