Is there any way to get the hostname and protocol from an URL?
My use case:
- On installation user inputs the application and API URL
- Get hostname
allowedOriginsconfiguration
Example url:
https://somelink.com/#/login
https://someapilink.com/api/
Desired result:
https://somelink.com
https://someapilink.com