Skip to content

Can't Get Ky Custom Referrer Policy Working #349

Answered by sholladay
LuisOsta asked this question in Q&A
Discussion options

You must be logged in to vote

Ky has no special handling for referrerPolicy, so it works the same as fetch does in this case.

but all requests are blocked by chrome's default strict-origin-when-cross-origin

No, referrerPolicy does not have any influence on whether requests will be blocked. It only controls the value of the HTTP Referer header, which is optional and just informational. That's all it does.

Since you're trying to use referrerPolicy: 'no-referrer-when-downgrade', I'm guessing that you are trying to fetch an http: URL from an https: page. That is not going to work because, these days, most browsers do not allow mixed content. So, in summary, it's your URLs, not your referrerPolicy, that is causing the pr…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@LuisOsta
Comment options

@sholladay
Comment options

@LuisOsta
Comment options

@sholladay
Comment options

@LuisOsta
Comment options

Answer selected by sholladay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants