# `Shopifex.ShopDomain`
[🔗](https://github.com/ericdude4/shopifex/blob/main/lib/shopifex/shop_domain.ex#L1)

Validates the `shop` query param Shopify sends on every install/auth
request against Shopify's own `*.myshopify.com` pattern.

The pattern is anchored at both ends so a crafted value like
`evil.example/x?.myshopify.com` or `attacker.myshopify.com.evil.example`
cannot pass — using an unanchored match to gate an external redirect is an
open-redirect vector (the redirect host is attacker-controlled).

# `valid?`

```elixir
@spec valid?(String.t()) :: boolean()
```

Returns `true` if `shop_url` is a well-formed `*.myshopify.com` domain.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
