summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-07-31 07:27:57 +0000
committerDouwe Maan <douwe@gitlab.com>2017-07-31 07:27:57 +0000
commit6fe736f2c927340ed8cf827080db781f7c8adcdf (patch)
tree8654cd449f14265058c051d5b6922be5a5bef551 /app/helpers
parent9a3b283402b8cc1c86802c526f19a459ce09c2e3 (diff)
parenteac8ae0fe00bcbb7e3cf04c4d0b6328cb4ddcc62 (diff)
downloadgitlab-ce-6fe736f2c927340ed8cf827080db781f7c8adcdf.tar.gz
Merge branch '35567-fix-relative-urls-in-webpack-public-path' into 'master'
Fix relative_url_root support for webpack chunks Closes #35567 See merge request !13165
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/webpack_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/webpack_helper.rb b/app/helpers/webpack_helper.rb
index 0386df22374..33453dd178f 100644
--- a/app/helpers/webpack_helper.rb
+++ b/app/helpers/webpack_helper.rb
@@ -34,6 +34,8 @@ module WebpackHelper
end
def webpack_public_path
- "#{webpack_public_host}/#{Rails.application.config.webpack.public_path}/"
+ relative_path = Rails.application.config.relative_url_root
+ webpack_path = Rails.application.config.webpack.public_path
+ File.join(webpack_public_host.to_s, relative_path.to_s, webpack_path.to_s, '')
end
end