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
Boxiang Sun
gitlab-ce
Commits
452ba19c
Commit
452ba19c
authored
Feb 21, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change check to only swap static middleware when it's enabled.
parent
a224a655
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
config/initializers/static_files.rb
config/initializers/static_files.rb
+2
-5
No files found.
config/initializers/static_files.rb
View file @
452ba19c
begin
app
=
Rails
.
application
app
=
Rails
.
application
if
app
.
config
.
serve_static_assets
# The `ActionDispatch::Static` middleware intercepts requests for static files
# The `ActionDispatch::Static` middleware intercepts requests for static files
# by checking if they exist in the `/public` directory.
# by checking if they exist in the `/public` directory.
# We're replacing it with our `Gitlab::Middleware::Static` that does the same,
# We're replacing it with our `Gitlab::Middleware::Static` that does the same,
...
@@ -12,7 +12,4 @@ begin
...
@@ -12,7 +12,4 @@ begin
app
.
paths
[
"public"
].
first
,
app
.
paths
[
"public"
].
first
,
app
.
config
.
static_cache_control
app
.
config
.
static_cache_control
)
)
rescue
# If ActionDispatch::Static wasn't loaded onto the stack (like in production),
# an exception is raised.
end
end
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