Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix webpack chunk loading with STATIC_URL_PREFIX#11526

Merged
zeripath merged 3 commits intogo-gitea:masterfrom
silverwind:publicpath
May 20, 2020
Merged

Fix webpack chunk loading with STATIC_URL_PREFIX#11526
zeripath merged 3 commits intogo-gitea:masterfrom
silverwind:publicpath

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented May 20, 2020

Previously, we had only set __webpack_public_path__ to a path which caused webpack chunks to be loaded from the current origin which is incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue currently seen on gitea.com.

Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 20, 2020
@zeripath zeripath added this to the 1.13.0 milestone May 20, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 20, 2020
@silverwind
Copy link
Member Author

Here's what I've been testing (testcdn.com mapped to localhost in hosts file):

ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
STATIC_URL_PREFIX = http://testcdn.com:%(HTTP_PORT)s/

Before:
Screen Shot 2020-05-20 at 19 47 28

After:
Screen Shot 2020-05-20 at 19 49 00

@silverwind
Copy link
Member Author

Needs backport to 1.11 as well.

@zeripath zeripath merged commit b797b76 into go-gitea:master May 20, 2020
silverwind added a commit to silverwind/gitea that referenced this pull request May 21, 2020
Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
silverwind added a commit to silverwind/gitea that referenced this pull request May 21, 2020
Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 22, 2020
zeripath pushed a commit that referenced this pull request May 22, 2020
Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.
techknowlogick pushed a commit that referenced this pull request May 28, 2020
Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants