Outerfaces.Odd.Plugs.OddRevProxyPlug (Outerfaces Dependency Distribution (ODD) v0.2.5)

View Source

Plug for parsing and validating rev-pinned URLs.

This plug:

  1. Detects requests to /__rev/<rev>/<namespace>/<path> URLs
  2. Validates that <rev> matches the current rev
  3. Strips the /__rev/<rev> prefix from the path
  4. Sets conn assigns for downstream plugs
  5. Handles rev mismatches (redirect navigations, 409 for assets)

Configuration

plug OddRevProxyPlug, mismatch_behavior: :redirect  # or :conflict

Conn Assigns

  • outerfaces_rev - The rev value extracted from the URL (if present)
  • outerfaces_rev_namespace - The namespace (spa, cdn, apps, etc.)
  • outerfaces_rev_matched - Boolean indicating if the rev matches current_rev()
  • outerfaces_rev_current - The current rev value (set on mismatch)