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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4878eae1
Commit
4878eae1
authored
Feb 02, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable webpack proxy in rspec environment due to conflicts with webmock gem
parent
cd6a6ff7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
config/initializers/static_files.rb
config/initializers/static_files.rb
+20
-12
No files found.
config/initializers/static_files.rb
View file @
4878eae1
...
@@ -16,21 +16,29 @@ if app.config.serve_static_files
...
@@ -16,21 +16,29 @@ if app.config.serve_static_files
# If webpack-dev-server is configured, proxy webpack's public directory
# If webpack-dev-server is configured, proxy webpack's public directory
# instead of looking for static assets
# instead of looking for static assets
if
Gitlab
.
config
.
webpack
.
dev_server
.
enabled
if
Gitlab
.
config
.
webpack
.
dev_server
.
enabled
app
.
config
.
webpack
.
dev_server
.
merge!
(
dev_server
=
{
enabled:
true
,
enabled:
true
,
host:
Gitlab
.
config
.
gitlab
.
host
,
host:
Gitlab
.
config
.
webpack
.
dev_server
.
host
,
port:
Gitlab
.
config
.
gitlab
.
port
,
port:
Gitlab
.
config
.
webpack
.
dev_server
.
port
,
https:
Gitlab
.
config
.
gitlab
.
https
,
manifest_host:
Gitlab
.
config
.
webpack
.
dev_server
.
host
,
manifest_host:
Gitlab
.
config
.
webpack
.
dev_server
.
host
,
manifest_port:
Gitlab
.
config
.
webpack
.
dev_server
.
port
,
manifest_port:
Gitlab
.
config
.
webpack
.
dev_server
.
port
,
)
}
app
.
config
.
middleware
.
insert_before
(
if
Rails
.
env
.
development?
Gitlab
::
Middleware
::
Static
,
dev_server
.
merge!
(
Gitlab
::
Middleware
::
WebpackProxy
,
host:
Gitlab
.
config
.
gitlab
.
host
,
proxy_path:
app
.
config
.
webpack
.
public_path
,
port:
Gitlab
.
config
.
gitlab
.
port
,
proxy_host:
Gitlab
.
config
.
webpack
.
dev_server
.
host
,
https:
Gitlab
.
config
.
gitlab
.
https
,
proxy_port:
Gitlab
.
config
.
webpack
.
dev_server
.
port
,
)
)
app
.
config
.
middleware
.
insert_before
(
Gitlab
::
Middleware
::
Static
,
Gitlab
::
Middleware
::
WebpackProxy
,
proxy_path:
app
.
config
.
webpack
.
public_path
,
proxy_host:
Gitlab
.
config
.
webpack
.
dev_server
.
host
,
proxy_port:
Gitlab
.
config
.
webpack
.
dev_server
.
port
,
)
end
app
.
config
.
webpack
.
dev_server
.
merge!
(
dev_server
)
end
end
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