-
I have the client of a website (Next.js) and the API (Express) hosted on different domains. And I'd need the API to be able to send a cookie to the client. I've got that working (I think) but all requests are blocked by chrome's default
And I think you should be able to customize that for your website so it has a different referrer policy but it doesn't work at all. Is the below code not do it? So I've got this custom ky instance setup:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Ky has no special handling for
No, Since you're trying to use |
Beta Was this translation helpful? Give feedback.
Ky has no special handling for
referrerPolicy
, so it works the same asfetch
does in this case.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 anhttp:
URL from anhttps:
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 yourreferrerPolicy
, that is causing the pr…