Server utility to get site URL #94
Closed
kevinwolfcr
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
What’s the difference with this? let { origin } = new URL(request.url) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since many people should be trying to get the site URL in their apps, it would be a good idea to export it from
remix-utils
. I already have a working implementation and if this makes sense, I can send a PR :).It could be exported as either
getURL
orgetRequestOrigin
to match withdocument.location.origin
Beta Was this translation helpful? Give feedback.
All reactions