openHPI / codeharbor

Exchange of Programming Exercises acrossdiverse Code Assessment Systems through CodeHarbor
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Enable contenthash in CSS filenames for webpack assets #1565

Closed MrSerth closed 1 month ago

MrSerth commented 1 month ago

Previously, CSS files lacked a content hash in their filename (i.e., application.css rather than application-3e40df0e5fb0538b2a29.css). Without a content hash, some browsers might use an outdated CSS file and compare it to the newest SRI hash sent by the server, resulting in an invalid SRI hash (thus preventing any CSS from being applied).

While I think this worked before, it could have been introduced by a recent dependency upgrade. Thus, this PR explicitly configures the content hash for CSS files. JS files were not affected by this problem.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.83%. Comparing base (265880e) to head (27854d6). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1565 +/- ## ======================================= Coverage 93.83% 93.83% ======================================= Files 123 123 Lines 2985 2985 ======================================= Hits 2801 2801 Misses 184 184 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.