Multitenancy.Plug.ResolveSite (multitenancy_phoenix v0.1.0)

Copy Markdown View Source

Resolves conn.host into a site and assigns :current_site and :current_theme. Hosts in :platform_hosts are left untouched so they can be served by the platform router; any other unknown host gets a 404.

plug Multitenancy.Plug.ResolveSite,
  resolver: Multitenancy.SiteResolver.YAML,
  platform_hosts: ["localhost"]

Summary

Functions

Stores site and its theme in the connection.

Functions

put_site(conn, site)

Stores site and its theme in the connection.