From ebd5f5148894888c118e95239fc437141c8e6b41 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Fri, 28 Jul 2017 12:49:07 -0500 Subject: [PATCH 1/2] fix relative_url_root support for webpack chunks --- app/helpers/webpack_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/webpack_helper.rb b/app/helpers/webpack_helper.rb index 0386df223741..33453dd178ff 100644 --- a/app/helpers/webpack_helper.rb +++ b/app/helpers/webpack_helper.rb @@ -34,6 +34,8 @@ def webpack_public_host 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 -- GitLab From eac8ae0fe00bcbb7e3cf04c4d0b6328cb4ddcc62 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Fri, 28 Jul 2017 12:56:43 -0500 Subject: [PATCH 2/2] add CHANGELOG.md entry for !13165 --- .../35567-fix-relative-urls-in-webpack-public-path.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/35567-fix-relative-urls-in-webpack-public-path.yml 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 000000000000..41b506681f92 --- /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: -- GitLab