Skip to content

Static Caching - Content type not saved, always delivered as text/html #2259

@andjsch

Description

@andjsch

Bug Description

With static caching enabled, as soon as a page is loaded the second time, the set content type is ignored. Instead, its content type is always text/html. See a sitemap as an example

How to Reproduce

Create a route that produces xml and enable static caching. See the above.

Route::statamic('/{loc}/sitemap.xml', 'sitemap', ['layout' => null, 'content_type' => 'application/xml'])->name('sitemap');

Extra Detail

first load:
image

second load onwards:
image

Environment

Laravel Valet

Statamic version: 3.0.0

PHP version: 7.4

Install method (choose one):
Used statamic install

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