Skip to content

Send credentials with on-demand-entries-ping again#3968

Closed
ivan-aksamentov wants to merge 1 commit into
vercel:canaryfrom
ivan-aksamentov:canary
Closed

Send credentials with on-demand-entries-ping again#3968
ivan-aksamentov wants to merge 1 commit into
vercel:canaryfrom
ivan-aksamentov:canary

Conversation

@ivan-aksamentov
Copy link
Copy Markdown

@ivan-aksamentov ivan-aksamentov commented Mar 8, 2018

In client/on-demand-entries-client.js parameter { credentials: 'same-origin' } of fetch() has been overwritten with { credentials: 'omit' } when universal-webpack has been merged. This currently prevents on-demand-entries-ping requests from sending cookies which may be required for some development configurations, for example, for authentication. This pull request rolls it back to credentials: 'same-origin'.

See also:

@arunoda
Copy link
Copy Markdown
Contributor

arunoda commented Mar 8, 2018

We can't send cookies with this request as a result of our multi-zones feature. #2498 is fine at that time since we didn't had that feature.

Currently, we can't do that. As the original PR author mentioned, I suggest to use a workaround.

@arunoda arunoda closed this Mar 8, 2018
@sushantbs
Copy link
Copy Markdown

sushantbs commented Mar 11, 2018

So if my server has a middleware that checks if the user is authenticated (based on cookies) and branches out a different flow (e.g redirect to login page) if she isn't, then how do I filter out the on-demand-entries-ping calls during dev? Is that work around currently, the only way to do this?

@lock lock Bot locked as resolved and limited conversation to collaborators May 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants