This method makes user inputs safer by ensuring that the host
query arguments from Shopify requests is valid.
const host = shopify.utils.sanitizeHost(req.query.host, true);
string
| ❗ required
The incoming host value.
boolean
| Defaults to false
If true
, throws an error when the host is invalid.
string | null
The host
value if it is properly formatted, otherwise null
.