You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated nosniff header to apply to non-204 responses only (#1858)
ref https://linear.app/tryghost/issue/ONC-179
- some self-hosters reported seing a prompt to download "auth-frame" when visiting a post with comments enabled on iOS
- recently, we've worked on an optimisation for comments UI to return a empty 204 for /ghost/auth-frame/ when no staff admin is authenticated (more context TryGhost/Ghost#19840)
- setting X-Content-Type-Options to nosniff helps to prevent browsers from interpreting files as a different MIME type than what is specified in the Content-Type header
- however, when returning an empty 204 response (No Content, therefore no Content-Type to check), iOS safari interpret this header as a file to download from the url
- with this change, we add the nosniff header only to non-204 responses
0 commit comments