Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Header - Better Auth
BA
Better Auth
•
4mo ago
•
3 replies
Hunter
Header
{
host
:
'
l
o
c
a
l
h
o
s
t
:8080
'
,
connection
:
'keep
-alive
'
,
'user
-agent
'
:
'Mozilla
/5
.0
(iPhone
; CPU iPhone OS 18
_5 like Mac OS X
) AppleWebKit
/605
.1
.15
(KHTML
, like Gecko
) Version
/18
.5 Mobile
/15E148 Safari
/604
.1
'
,
accept
:
'application
/json
'
,
origin
:
'
http://localhost:5173
'
,
'sec
-fetch
-site
'
:
'same
-site
'
,
'sec
-fetch
-mode
'
:
'cors
'
,
'sec
-fetch
-dest
'
:
'empty
'
,
referer
:
'
http://localhost:5173/
'
,
'accept
-encoding
'
:
'gzip
, deflate
, br
, zstd
'
,
'accept
-language
'
:
'en
-US
,en
;q
=0
.9
'
}
session
:
{
cookieCache
:
{
enabled
: true
,
maxAge
: 20
* 60
* 60
,
/
/ Cache duration in seconds
}
,
}
,
/
/ The connection between the frontend and the backend
.
app
.use
(cors
(
{ origin
: process
.env
.FRONTEND
_URL
, credentials
: true
}
)
)
;
const session
= await auth
?
.api
?
.getSession
(
{
headers
: fromNodeHeaders
(req
.headers
)
,
}
)
;
console
.log
(
"sess
"
, session
)
;
These are every thing am getting session null in the server side express
. js
@Better Auth
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Express header
BA
Better Auth / help
4mo ago
Missing valid authorization header
BA
Better Auth / help
8mo ago
messing up cookie header in local environment
BA
Better Auth / help
2mo ago
what is the header for the token ?
BA
Better Auth / help
6mo ago