Server error when blaming a pdf file

Problem

Example blob

Screenshot_2022-12-15_at_17.44.04

We don't show Blame button for .pdf files. But it's still possible to access it via direct URL.

https://gitlab.com/gitlab-com/www-gitlab-com/-/blame/master/sites/uncategorized/source/resources/downloads/esg_instagraphic-aws_marketplace_may_2020_.pdf

Solution

  • Verify what logic we use on frontend to disable Blame button.
  • Apply the same logic for backend