next.js
dd8af23c - Skip the cookie parser when a request cannot carry preview cookies

Commit
24 days ago
Skip the cookie parser when a request cannot carry preview cookies tryGetPreviewData created a headers adapter and parsed every cookie of the request to look up two names. A cookie's name is a part of the `cookie` header as it was sent, so when the header is absent or contains neither name the answer is known: no preview data. The header is looked up the way the adapter does it (the first key that is `cookie` in any casing); a `Headers` instance or a value that is not a string goes through the parser as before.
Author
Committer
Parents
Loading