Sitesx v0.11.0 Sitesx.Domain View Source
Sitesx.Domain manages DNS record which has detect, extract, create method on DNS Provider.
Link to this section Summary
Link to this section Functions
See Sitesx.DNS
See Sitesx.DNS.Cloudflare.create_subdomain/2.
Make sure dns record using nslookup.
Example
Sitesx.Domain.ensured_domain? "www.example.com"
#-> ture
Link to this function
ensured_subdomain?(subdomain)
View Source
ensured_subdomain?(String.t) :: boolean
Make sure subdomain using nslookup.
Example
Sitesx.Domain.ensured_subdomain? "www"
#-> false
Link to this function
extract_subdomain(conn)
View Source
extract_subdomain(Plug.Conn.t) :: String.t | nil
Extract subdomain from Plug.Conn
Example
Sitesx.Domain.extract_domain conn
#-> "www"