summaryrefslogtreecommitdiff
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
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
-rw-r--r--app/helpers/webpack_helper.rb4
-rw-r--r--changelogs/unreleased/35567-fix-relative-urls-in-webpack-public-path.yml5
2 files changed, 8 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
diff --git a/changelogs/unreleased/35567-fix-relative-urls-in-webpack-public-path.yml b/changelogs/unreleased/35567-fix-relative-urls-in-webpack-public-path.yml
new file mode 100644
index 00000000000..41b506681f9
--- /dev/null
+++ b/changelogs/unreleased/35567-fix-relative-urls-in-webpack-public-path.yml
@@ -0,0 +1,5 @@
+---
+title: Fix asynchronous javascript paths when GitLab is installed under a relative
+ URL
+merge_request: 13165
+author: