unjs / h3

⚡️ Minimal H(TTP) framework built for high performance and portability

Home Page:https://h3.unjs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add getRequestOrigin(event)

DavidDeSloovere opened this issue · comments

Describe the feature

A new getRequestOrigin(event) util would be useful.
It's a combination of getRequestProtocol(event) + '://' + getRequestHost(event).

Shall I send a PR?

Additional information

  • Would you be willing to help implement this feature?

Hi. You can use getRequestURL(event).origin

(please ping me to reopen if I didn't understand correctly)