Skip to content

[Bug] Autodetection of text/plain markdown files not working #21

@tkapias

Description

@tkapias

The issue

I checked Autodetection in Enlight, but the extension does not start by itself for markdown files even if the header was forced as text/plain.

Manually it works good, even Auto-Detect.

Context

I use Dufs file server and I forced nginx to rewrite content-type headers for .md files to text/plain; charset=UTF-8.

  • File server: Dufs
  • Nginx Proxy: nginx 1.18
  • Firefox: 115.15.0esr
  • Enlight: 2.7.11.0

On Firefox, the file opens inline as a text/plain with this header (same as with curl --include):

HTTP/2 200 OK
server: nginx/1.18.0
date: Wed, 02 Oct 2024 06:57:30 GMT
content-length: 11783
last-modified: Wed, 02 Oct 2024 04:31:32 GMT
etag: "1727843492695-11783"
content-disposition: inline; filename="readme.md"
accept-ranges: bytes
content-type: text/plain; charset=UTF-8
X-Firefox-Spdy: h2

I also tried without forcing charset=UTF-8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions