Skip to content

impl: Redirect paths starting with /public/ when not Authed #14

@5HT2

Description

@5HT2

Ideally, when an Auth header is not provided, if a user is given a link such as https://cdn.frogg.ie/public/pdfs/, or a specific file, it should redirect to https://cdn.frogg.ie/pdfs/ (or the specific file), if it exists.

This is preferable over being handed a 404, and if you have the URL of an existing file you could already remove the /public/ from the URL yourself.

The only downside I could see this having is it being confusing in some cases?? Maybe? Like, if you thought you had provided an Auth and weren't expecting it to serve non-Authed content.

  • The only cases where this really matters could easily be mitigated by only redirecting on GET and nothing else, to avoid rewriting real edit requests.

  • Maybe this be configurable??

  • Maybe config options allow enabling this only for folder paths?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions