Artifact html viewer not rendering anymore

Summary

Due to security changes in %14.10, the raw endpoint returns with the content type plain/text for security reasons. This change impacts self-managed customers.

Original problem summary Artifact html viewer does not render html file anymore it just renders plain text instead.

I worked till the 28th of march 2022 before 4PM UTC.

This exact same regression happen in 2020 or 2021

Steps to reproduce

Generate a html file in a job artifact. Click on browse, click on the html file

Artifact can be checked on this job : https://gitlab.com/thomas_rosenblatt/test-html-rendering/-/jobs/2263198084

What is the current bug behavior?

Instead of redirecting html it just display the html content as shown below

What is the expected correct behavior?

It shall render the html file in the browser as it always did

Public project

https://gitlab.com/thomas_rosenblatt/test-html-rendering/-/merge_requests

Relevant logs and/or screenshots

https://gitlab.com/thomas_rosenblatt/test-html-rendering/-/jobs/2263198084

errors.html

Screenshot_2022-03-29_at_10.31.37

Output of checks

This bug happens on GitLab.com

Edited by Jocelyn Eillis