Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
b67f8eee
Commit
b67f8eee
authored
Feb 02, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use @repository
parent
b1f22aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
app/controllers/projects/avatars_controller.rb
app/controllers/projects/avatars_controller.rb
+2
-3
No files found.
app/controllers/projects/avatars_controller.rb
View file @
b67f8eee
...
@@ -2,11 +2,10 @@ class Projects::AvatarsController < Projects::ApplicationController
...
@@ -2,11 +2,10 @@ class Projects::AvatarsController < Projects::ApplicationController
before_action
:project
before_action
:project
def
show
def
show
repository
=
@project
.
repository
@blob
=
@repository
.
blob_at_branch
(
'master'
,
@project
.
avatar_in_git
)
@blob
=
repository
.
blob_at_branch
(
'master'
,
@project
.
avatar_in_git
)
if
@blob
if
@blob
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
repository
,
@blob
))
headers
.
store
(
*
Gitlab
::
Workhorse
.
send_git_blob
(
@
repository
,
@blob
))
headers
[
'Content-Disposition'
]
=
'inline'
headers
[
'Content-Disposition'
]
=
'inline'
headers
[
'Content-Type'
]
=
@blob
.
content_type
headers
[
'Content-Type'
]
=
@blob
.
content_type
head
:ok
# 'render nothing: true' messes up the Content-Type
head
:ok
# 'render nothing: true' messes up the Content-Type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment