0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore: add caution for primary domain util

This commit is contained in:
Gao Sun 2023-04-20 19:17:12 +08:00
parent 748878ce5b
commit 4c783fcaec
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -1 +1,5 @@
/**
* **CAUTION:** This function takes the last two parts of the hostname which may cause issues for
* some second-level domains, e.g. `.co.uk`.
*/
export const getPrimaryDomain = () => window.location.hostname.split('.').slice(-2).join('.');