Skip to content

Automatically exclude non HTML routes from static caching #1471

Description

@robdekort

Currently you have to exclude non HTML routes from static caching manually. It might make sense for Statamic to exclude those routes by default, since those cached routes return the wrong headers anyways which can lead to issues.

For example if you have a robots.txt route and don't exclude it from static caching, on production it will return HTML headers and a 404 status, this causes Google to shout at you in their Dev Console. Same issue with a site.webmanifest route you might have.

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