observe_dispatch_host/2

Try to find the site for the request Called when the request Host doesn’t match any active site.

Type:

first

Return:

{ok, #dispatch_redirect{}} or undefined

#dispatch_host{} properties:

  • host: binary

  • path: binary

  • method: binary

  • protocol: union

Edit on GitHub

observe_dispatch/2 Dispatch notifications observe_dispatch_rewrite/3

Referred by

Dispatch rules

Dispatch rules route incoming requests to controllers.