View Source Routex.Extension.Cloak (Phoenix Routes Extension Framework v0.3.0-alpha.4)

Transforms routes to be unrecognizable.

Warning

This extension is intended for testing and demonstration. It's behavior may change over time.

Configuration

# file /lib/example_web/routex_backend.ex
defmodule ExampleWeb.RoutexBackend do
  use Routex.Backend,
  extensions: [
+  Routex.Extension.Cloak,
   Routex.Extension.AttrGetters
],

## Pseudo result

/products/   /1
/products/:id/edit   rewrite: /:id/02       in browser: /1/02, /2/02/ etc...
/products/:id/show/edit   rewrite: /:id/03    in browser: /1/03, /2/03/ etc...

Routex.Attrs

Requires

  • none

Sets

  • none