When AssetControllerBase delivers existing file should add content-type

Created on 29 June 2023, over 1 year ago
Updated 24 July 2023, over 1 year ago

After we upgraded to Drupal 10.1 we also changed the nginx configuration as the release notes mentioned. But some cases we found that when the asset aggregation is enabled the page does not appeared properly in the browser. We found Chrome 114 "Refused to apply style ... because its MIME type ('text/plain') or ('text/troff') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

When I've cleared the generated files, the page is appeared properly. But when i refresh the page, the browser got these assets with the wrong Content type header.

If I modify the AssetControllerBase::deliver method, the add "Content-type" header the probleam disapears.

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
Asset libraryΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡­πŸ‡ΊHungary tikaszvince

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024