Skip to content

What could be preventing me from seeing cookies in route.ts? #79320

Answered by icyJoseph
gcb asked this question in App Router
Discussion options

You must be logged in to vote

Hi,

What other settings do you have? I can't reproduce.

curl localhost:1234/foo --cookie token=bar -v

* Host localhost:1234 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:1234...
* Connected to localhost (::1) port 1234
> GET /foo HTTP/1.1
> Host: localhost:1234
> User-Agent: curl/8.7.1
> Accept: */*
> Cookie: token=bar
> 
* Request completely sent off
< HTTP/1.1 200 OK
< content-type: text/plain;charset=UTF-8
< set-cookie: token=bar
< Date: Thu, 22 May 2025 09:04:50 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
< 
* Connection #0 to host localhost left intact
Hello, Next.js!% 

Notice the set-cookie header. What Next.js version are you …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@icyJoseph
Comment options

Answer selected by gcb
@gcb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants