Question: I have a node script that fetches all the peers. Can I filter that output using php?

I mean I dont need all the peers fetched by that script, so can i just get some specific peers using functions like `strcmp`? Currently my node script outputs the result in an html page. But I want it to be printed on php page with filter applied to it.

Answer: 
101chris's proposal works fine on 7.x, but needs some rework on gitlab 8.x.
Here's my update tested on 8.14.4:

/opt/gitlab/embedded/service/gitlab-rails/app/helpers/blob\_helper.rb :

```
  def safe_content_type(blob)
    if blob.text?
      case File.extname(blob.name).downcase
      when '.html'
        'text/html'
      when '.css'
        'text/css'
      when '.xml'
        'text/xml'
      when '.js'
        'application/javascript'
      else
        'text/plain; charset=utf-8'
      end
    elsif blob.image?
      blob.content_type
    else
      'application/octet-stream'
    end
  end

```
It appears in GitLab 11.7-CE you need to update `/opt/gitlab/embedded/service/gitlab-rails/app/helpers/workhorse_helper.rb` and change the following section:

```
def send_git_blob(repository, blob, inline: true)
  headers.store(*Gitlab::Workhorse.send_git_blob(repository, blob))

  headers['Content-Disposition'] = inline ? 'inline' : 'attachment'
  workhorse_set_content_type!

  render plain: ""
end

```

To the following (using ".html" as an example):

```
def send_git_blob(repository, blob, inline: true)
  headers.store(*Gitlab::Workhorse.send_git_blob(repository, blob))

  headers['Content-Disposition'] = inline ? 'inline' : 'attachment'

  if File.extname(@blob.name).downcase == '.html'
    headers['Content-Type'] = 'text/html'
  else
    workhorse_set_content_type!
  end

  render plain: ""
end

```

As others have stated, the `Content-Type` is set to `text/plain` for security reasons as it protects you against XSS exploits. If you don't have a trusted closed set of users using GitLab then please don't do this.