Skip to content

Ignore hidden does nothing #4016

@moan0s

Description

@moan0s

Setting ignoring hidden does nothing.

Steps to reproduce

  1. Set ignore hidden = False.
Image
  1. Create a file like .well-known/test
  2. Access example.org/.well-known/test in the browser

Expected result

Raw content of .well-known/test is shown

Actual result

404 error page is rendered

Possible reason

In system/router.php, line 21, the access to files and folders is blocked, regardless of the setting

// Block all direct access to files and folders beginning with a dot
strpos($path, '/.') !== false
// Block all direct access for these folders
|| preg_match('`^/(\.git|cache|bin|logs|backup|webserver-configs|tests)/`ui', $path)

Uncommenting the line solves the issue

Reasoning

Why I need this: Grav should be not only be serving a blog but also some static files that are required to be served on the root domain by the matrix protocol: https://spec.matrix.org/latest/client-server-api/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions