π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: is it ip
Nevo David2c90cdd03b69
diff --git a/libraries/helpers/src/subdomain/subdomain.management.ts b/libraries/helpers/src/subdomain/subdomain.management.tsindex 8f74c9881..2d391f398 100644--- a/libraries/helpers/src/subdomain/subdomain.management.ts+++ b/libraries/helpers/src/subdomain/subdomain.management.ts@@ -1,6 +1,11 @@import {allTwoLevelSubdomain} from "./all.two.level.subdomain";export function removeSubdomain(domain: string) {+ // Check if the domain is an IP address with optional port+ const ipRegex = /^(https?:\/\/)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(:\d+)?$/;+ if (ipRegex.test(domain)) {+ return domain; // Return the original domain if it's an IP address+ }// Split the domain into its partsconst parts = domain.split('.');