Skip to content

martide/trailing_slash_plug

Repository files navigation

TrailingSlashPlug

A plug for removing slash at the end of a request path and sending a 301

Installation

If available in Hex, the package can be installed by adding trailing_slash_plug to your list of dependencies in mix.exs:

def deps do
  [
    {:trailing_slash_plug, "~> 0.1"}
  ]
end

Usage

pipeline :trailing_slash do
  plug(TrailingSlashPlug)
end

scope "/example", as: :example_pages do
  pipe_through([:trailing_slash])
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/trailing_slash_plug.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages