WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Reconsider default redirect code #283

@cllns

Description

@cllns

Our default redirect is 301: Moved Permanently

https://github.com/hanami/router/blob/50826c98fa9c98ab9a1bfd1de7c99e35370b42e7/lib/hanami/router.rb#L710

In browsers, this is often cached and it can be hard to break that cache. I think we should consider switching our default to 302: Found, which is a temporary redirect.

This is a breaking change so it'd have to be for a 3.0 release. The other option would be to keep 301 as the unconfigured default, then make this a configurable value, then generate new apps with the configuration set. But that seems like a lot of work for something so minor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions