Trailing slash issue.
Closed this issue · 2 comments
keferboeck commented
You cannot configure if you want to add a trailing slash or have it removed.
Currently I have my rails setup to not use trailing slash
application.rb
config.action_controller.default_url_options = { trailing_slash: false }
However the canonical URL has a trailing slash and this URL is redirect to no trailing slash.
jumph4x commented
@keferboeck You might want to change this line to set the collections to an empty array: https://github.com/jumph4x/canonical-rails/blob/master/lib/generators/canonical_rails/install/templates/canonical_rails.rb#L20
I used collections vs single resource URLs as a broad way of determining which URLs should canonicalize with a trailing slash to follow Unix and very early web conventions, but Rails and other frameworks do not generally follow this standard.
jumph4x commented
@keferboeck marked as resolved.