EndPointBlank.Phoenix.RoutePatternFinder (end_point_blank_elixir v0.3.1)

Copy Markdown

Resolves the route pattern (e.g. /books/:id) for a live request.

Uses phoenix_router from conn.private to match the actual request path against the router's compiled route table, returning the pattern string so Intake can do an exact match against registered endpoints.

Summary

Functions

Returns the matching route pattern for conn, or conn.request_path as a fallback when no pattern match is found.

Functions

find(conn, router)

Returns the matching route pattern for conn, or conn.request_path as a fallback when no pattern match is found.