mschae / trailing_format_plug

An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json
25 stars 15 forks source link

Plug does not work in router with phoenix 1.2 #7

Closed smpallen99 closed 7 years ago

smpallen99 commented 7 years ago

When I add the plug per the instructions on the readme, the plug :super does not compile. If I add the plug to the start of the :browser pipeline and do a request like http://ip/1/edit.json it does not match the edit route. So, it looks like the match is attempted before the pipeline is executed.

However, If I add the plug to the Endpoint, everything works fine.

Am I missing something? Do you want a PR on the readme file?

"phoenix": {:hex, :phoenix, "1.2.1" "plug": {:hex, :plug, "1.2.2"

mschae commented 7 years ago

That would be great.

This Plug hasn't seen much love for quite a while. Sorry about that.

mschae commented 7 years ago

Fixed in af1ee3b81d13491fcb53dc0cf5ef4b8b83a73e3f but thanks for reporting!