Next.js Discord

Discord Forum

What's the best way to get hostname in "use server", without .env?

Answered
Red harvester ant posted this in #help-forum
Open in Discord
Red harvester antOP
^
Answered by alfon
one hacky way is to try to get them from headers().get('referer')
View full answer

5 Replies

Red harvester antOP
or better, to create a blob with server function
of a video
one hacky way is to try to get them from headers().get('referer')
Answer
Asiatic Lion
good one
@alfon one hacky way is to try to get them from `headers().get('referer')`
Red harvester antOP
i realized that, u can't pass blobs from server to client lol